The document discusses Drupal services and REST APIs. It describes how services splits functionality into server, service and authentication modules. It covers common server types like REST, JSONRPC and authentication with OAuth. Resources were introduced in version 2.x to add structure and semantics compared to methods. The document also discusses response formats, input formats, and a proposed future of independent endpoints for modules to publish customized APIs.
PHP 5.3 and Lithium: the most rad php frameworkG Woo
Presentation given to the Orange County PHP meetup on Feb 24 2010. The presentation covers the new features in php 5.3 and goes on to show how they are used in Lithium, the most rad php framework.
Con la versione 7 di Drupal è stato introdotto il concetto di Entity, poi evoluto con la versione 8, utilizzato come base di buona parte degli elementi core (nodi, tassonomie, utenti, ...), ma - soprattutto - è stata data la possibilità di costruire entity custom. L'utilizzo di queste apre le possibilità di personalizzazione dello strumento ad un livello superiore velocizzando notevolmente lo sviluppo.
Verranno mostrate le potenzialità nell'uso delle Entity custom e le integrazioni possibili.
PHP 5.3 and Lithium: the most rad php frameworkG Woo
Presentation given to the Orange County PHP meetup on Feb 24 2010. The presentation covers the new features in php 5.3 and goes on to show how they are used in Lithium, the most rad php framework.
Con la versione 7 di Drupal è stato introdotto il concetto di Entity, poi evoluto con la versione 8, utilizzato come base di buona parte degli elementi core (nodi, tassonomie, utenti, ...), ma - soprattutto - è stata data la possibilità di costruire entity custom. L'utilizzo di queste apre le possibilità di personalizzazione dello strumento ad un livello superiore velocizzando notevolmente lo sviluppo.
Verranno mostrate le potenzialità nell'uso delle Entity custom e le integrazioni possibili.
Design Patterns avec PHP 5.3, Symfony et PimpleHugo Hamon
Cette conférence présente deux grands motifs de conception : l'observateur et l'injection de dépendance. Ce sujet allie à la fois théorie et pratique. Le composant autonome EventDispatcher de Symfony ainsi que le conteneur d'injection de dépendance Pimple sont mis à l'honneur avec des exemples pratiques d'usage. Ces cas pratiques combinent du code de l'ORM Propel ainsi que le composant autonome Zend\Search\Lucene du Zend Framework 2
Building Lithium Apps (Like a Boss) was a workshop presented on the structure and philosophy of the Lithium framework and its applications, and how best to take advantage of them.
Un gioco in cui vincono tutti o due piccioni con una fava ;)
Lavorare rivolti alla creazione di valore per il cliente e da questo ottenere una libreria quasi pronta per essere pubblicata
Lithium: The Framework for People Who Hate FrameworksNate Abele
This is the presentation was given at ConFoo on March 11th by Nate Abele and Joël Perras, and is an introduction to the architectural problems with other frameworks that Lithium was designed to address, and how it addresses them. It also introduces programming paradigms like functional and aspect-oriented programming which address issues that OOP doesn't account for.
Finally, the talk provides a quick overview of the innovative and unparalleled features that Lithium provides, including the data layer, which supports both relational and non-relational databases.
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
Silex is a brand new PHP 5.3 micro framework built on top of the Symfony2 de decoupled components. In this session, we will discover how to build and deploy powerful REST web services with such a micro framework and its embedded tools.
The first part of this talk will introduce the basics of the REST architecture. We fill focus on the main concepts of REST like HTTP methods, URIs and open formats like XML and JSON.
Then, we will discover how to deploy REST services using most of interesting Silex tools like database abstraction layer, template engine and input validation. We will also look at unit and functional testing frameworks with PHPUnit and HTTP caching with Edge Side Includes and Varnish support to improve performances.
Ketensamenwerking: een voorwaarde voor succesPaviljoen 2030
Ferry van Wilgenburg, divisiemanager vastgoedbeheer woningbouwvereniging Woonwaard in Alkmaar, was een van de sprekers tijdens de RTLZ Nyenrode Masterclass Duurzaamheid op 31 maart 2010. Tijdens de masterclass vertelde hij hoe je succes kunt boeken met ketensamenwerking bij renovatieprocessen. Van Wilgenburg organiseerde eerder ook al samen met Aedes en Bouwend Nederland het Nationaal Symposium 'Ketensamenwerking in de bouw'.
Design Patterns avec PHP 5.3, Symfony et PimpleHugo Hamon
Cette conférence présente deux grands motifs de conception : l'observateur et l'injection de dépendance. Ce sujet allie à la fois théorie et pratique. Le composant autonome EventDispatcher de Symfony ainsi que le conteneur d'injection de dépendance Pimple sont mis à l'honneur avec des exemples pratiques d'usage. Ces cas pratiques combinent du code de l'ORM Propel ainsi que le composant autonome Zend\Search\Lucene du Zend Framework 2
Building Lithium Apps (Like a Boss) was a workshop presented on the structure and philosophy of the Lithium framework and its applications, and how best to take advantage of them.
Un gioco in cui vincono tutti o due piccioni con una fava ;)
Lavorare rivolti alla creazione di valore per il cliente e da questo ottenere una libreria quasi pronta per essere pubblicata
Lithium: The Framework for People Who Hate FrameworksNate Abele
This is the presentation was given at ConFoo on March 11th by Nate Abele and Joël Perras, and is an introduction to the architectural problems with other frameworks that Lithium was designed to address, and how it addresses them. It also introduces programming paradigms like functional and aspect-oriented programming which address issues that OOP doesn't account for.
Finally, the talk provides a quick overview of the innovative and unparalleled features that Lithium provides, including the data layer, which supports both relational and non-relational databases.
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
Silex is a brand new PHP 5.3 micro framework built on top of the Symfony2 de decoupled components. In this session, we will discover how to build and deploy powerful REST web services with such a micro framework and its embedded tools.
The first part of this talk will introduce the basics of the REST architecture. We fill focus on the main concepts of REST like HTTP methods, URIs and open formats like XML and JSON.
Then, we will discover how to deploy REST services using most of interesting Silex tools like database abstraction layer, template engine and input validation. We will also look at unit and functional testing frameworks with PHPUnit and HTTP caching with Edge Side Includes and Varnish support to improve performances.
Ketensamenwerking: een voorwaarde voor succesPaviljoen 2030
Ferry van Wilgenburg, divisiemanager vastgoedbeheer woningbouwvereniging Woonwaard in Alkmaar, was een van de sprekers tijdens de RTLZ Nyenrode Masterclass Duurzaamheid op 31 maart 2010. Tijdens de masterclass vertelde hij hoe je succes kunt boeken met ketensamenwerking bij renovatieprocessen. Van Wilgenburg organiseerde eerder ook al samen met Aedes en Bouwend Nederland het Nationaal Symposium 'Ketensamenwerking in de bouw'.
Eberhard Dijkhuis, innovatief en duurzamer bouwer uit Hardenberg, gaf op 15 oktober deze presentatie op '15 Minutes for our Future', een congres van Paviljoen 2030.
Meer informatie:
http://www.dijkhuis.nu
Ferry van Wilgenburg, directeur vastgoed woningcorporatie Woonwaard Alkmaar, gaf op 15 oktober deze presentatie op '15 Minutes for our Future', een congres van Paviljoen 2030.
Meer informatie:
http://www.bouwketens.nl
Our Common Future 2.0 - roadmaps for our future societyPaviljoen 2030
Jan Jonker, initiatiefnemer van Our Common Future 2.0 - roadmaps for our future society, gaf op 15 oktober deze presentatie op '15 Minutes for our Future', een congres van Paviljoen 2030.
Meer informatie:
http://www.ourcommonfuture.nl
Come to this talk prepared to learn about the Doctrine PHP open source project. The Doctrine project has been around for over a decade and has evolved from database abstraction software that dates back to the PEAR days. The packages provided by the Doctrine project have been downloaded almost 500 million times from packagist. In this talk we will take you through how to get started with Doctrine and how to take advantage of some of the more advanced features.
Built-in query caching for all PHP MySQL extensions/APIsUlf Wendel
Query caching boosts the performance of PHP MySQL applications. Caching can be done on the database server or at the web clients. A new mysqlnd plugin adds query caching to all PHP MySQL extension: written in C, immediately usable with any PHP application because of no API changes, supports Memcache, APC, SQLite and main memory storage, integrates itself smoothless into existing PHP deployment infrastructure, helps you to scale by client, ... Enjoy!
Chicago Coder Conference 2015
Speaker Biography: Wei Ru
Wei Ru has over 15 years of professional experience in design and development of Java enterprise applications across multiple industries. Currently he works as a technical architect at STA Group, LLC. He received a M.S. degree in Computer Science from Loyola University Chicago. As a software developer with an emphasis on Java, he strongly believes in software re-usability, open standards, and various best practices. He has successfully delivered many products using open source platforms and frameworks during his IT consultancies.
Speaker Biography: Vincent Lau
Vincent Lau has been Senior Architect at STA Group in Chicago for the last two years. He received a B.S. degree in Accounting and Finance from the University of Illinois at Chicago and worked on M.S. of Computer Science at DePaul University. He has over 15 years of software design, development, testing and project management experience on large enterprise distributed computing platforms. Most recently, he has worked on web based applications using Java, Spring, JavaScript, Angular.js, jQuery and web services. He previously had Senior Software Engineer and Lead positions in Royal Caribbean Cruises, Wells Fargo Bank, Cap Gemini America and Trans Union Corp.
Presentation: Practical AngularJS
AngularJS has been seen gaining momentum recently. Whether you want to develop a modern single-page application or to spice up only the view enabled by a traditional MVC web framework, AngularJS allows you to write cleaner, shorter code. AngularJS’ two-way data binding feature allows a declarative approach on views and controllers, and ultimately code modulization. With this strategic change and many features offered by AngularJS, learning AngularJS can be challenging. In this session, we will share some of the experiences we had in Angular UI development, we will cover:
AngularJS modules and common project setup
Communicating to a Restful service
Commonly used Angular functions, directives
UI Bootstrap, grid views and forms in AngularJS
Custom Angular directives
Asynchronous functions and event processing
This talk represents the combined experience from several web development teams who have been using Symfony2 since months already to create high profile production applications. The aim is to give the audience real world advice on how to best leverage Symfony2, the current rough spots and how to work around them. Aside from covering how to implement functionality in Symfony2, this talk will also cover topics such as how to best integrate 3rd party bundles and where to find them as well as how to deploy the code and integrate into the entire server setup.
AngularJS primer, covering the pros and cons of AngularJS, basic concepts with code snippets, testing, caveats and a lot of links forward. It's good for getting a glimpse on AngularJS and getting hint on how to write your first templates, controllers, services, directives etc.
SC5 has used this training internally and given it to several customers with very successful results. The training has been given in a workshop form, is accompanied by a few practical exercises (that are not public yet).
The original set is made by SC5er Kari Heikkinen, published here by Lauri Svan for Aalto University course T-111.4360 Design of WWW Services.
Opencast Admin UI - Introduction to developing using AngularJSbuttyx
This presentation is intended to help developers anticipating using and potentially extending the new Admin UI get a hands-on introduction into the Angular JS portion of the software. It has been presented in the form of a workshop and therefore the last slides (starting with the 22) could seem a bit abstract.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
3. The purpose of services
Create a Drupal API for exposing web API:s
4. The official version
- Create a unified Drupal API for web
services to be exposed in a variety of
different server formats.
- Provide a service browser to be able to
test methods.
- Allow distribution of API keys for developer
access.
5. Services
Functionality split into three kinds of
modules that provides:
✦ Servers
✦ Services
✦ Authentication mechanisms (new in 2.x)
7. Services
✦ That exposes core
✦ Node, user, taxonomy, menu, file,
✦ That exposes other modules
✦ Views
✦ And additional services implemented in other
contrib modules that I cant remember right
now.
10. Methods
✦ Pretty similar to the menu system
✦ Each service-implementing module returns a
non-associative array with methods
✦ Method definitions contains a method
attribute: “node.get”, “node.view”,
“node.save”, “node.delete”
✦ ...and information about callbacks,
parameters, access rules et cetera.
12. Drawbacks
✦ No semantics
✦ node.view is treated exactly like node.delete
✦ Lack of consistency
✦ “taxonomy.saveTerm”, “node.save”
✦ “node.view”, “user.get”
✦ Lack of structure makes it hard to alter through
alter hooks.
13. Resources
✦ Adds semantics to the methods
✦ Natural grouping around resources
✦ no more “taxonomy.saveTerm”
✦ Methods are divided into CRUD-operations,
actions, targeted actions and relationships
15. Extensions of CRUD
✦ Actions
✦ Similar to static class methods:
Node::publish_my_drafts()
✦ Targeted actions
✦ Like class methods: $node->publish()
✦ Relationships
✦ Like targeted actions but for read-operations:
$node->get_comments()
16. All old services can be expressed
as resources
✦ Direct translation through adding the old
methods (taxonomy.saveTerm,
saveVocabulary, getTree, selectNodes) as
actions on the taxonomy resource.
✦ Or even better, create them as real
resources (vocabulary and term).
17. OAuth
✦ Secure protocol for avoiding “the
password anti-pattern”.
✦ A strong emerging standard.
✦ Client implementations available
for most small and large
languages.
✦ See http://oauth.net/code
18. OAuth workflow for the user
✦ Initiates the authorization process in a
third-party application (consumer). Is
redirected to our site (the provider).
✦ The user logs in to the provider and is asked
to authorize the consumer.
✦ The user is sent back to the consumer. And
were done!
19. Token-based security
✦ Three tokens (key+secret) are involved: consumer-
token, request-token and access-token.
✦ The consumer uses it’s consumer-token to retrieve a
request token.
✦ The user authorizes our request token.
✦ The consumer uses it’s request token to fetch a
access token.
✦ The consumer can then use the consumer+access-
token to access protected resources.
20. The REST server
✦ REST is designed to work as well as possible with HTTP.
✦ All resources are accesible though a url
✦ Create: POST http://example.com/node
✦ Retrieve: GET http://example.com/node/123
✦ Index: GET http://example.com/node
✦ Update: PUT http://example.com/node/123
✦ Delete: DELETE http://example.com/node/123
21. The extensions to CRUD
✦ Actions
✦ POST
http://example.com/node/publish_my_drafts
✦ Targeted actions
✦ POST
http://example.com/node/123/publish
✦ Relationships
✦ GET
http://example.com/node/123/comments
22. Multiple response formats
✦ XMLRPC always returns XML, JSONRPC returns JSON, SOAP
returns XML+cruft and so on.
✦ REST is format agnostic and can give responses in different
formats based on file endings and Accept-headers.
✦ GET http://example.com/node/123.json
✦ GET http://example.com/node/123.xml
✦ GET http://example.com/node/123.php
✦ Other modules can add and alter response formats through
hook_rest_server_response_formatters_alter().
23. All response formats inherit from
RESTServerView
<?php
/**
* Base class for all response format views
*/
abstract class RESTServerView {
protected $model;
protected $arguments;
function __construct
__construct($model, $arguments= array
= array()) {
$this->
->model = $model;
$this->
->arguments = $arguments;
}
public abstract function render
render();
}
24. More advanced response formats
✦ The response formats that can’t use simple
serialization
✦ RSS, iCal, xCal med flera
✦ The format can then demand that the
method shall implement a data model that
works like a adapter.
26. The resource declares support for
),
the model, not the format
),
'models' => array
array(
'ResourceFeedModel' => array
array(
'class' => 'NodeResourceFeedModel',
),
'ResourceTimeFeedModel' => array
array(
'class' => 'NodeResourceFeedModel',
),
),
'access arguments' => array
array('access content'),
27. Multiple input-formats
✦ Built in support for x-www-form-urlencoded, yaml, json and
serialized php.
✦ Can be extended through
hook_rest_server_request_parsers_alter().
✦ Determined by the Content-type-header for the call and
therefore matched to mime-types:
✦ 'application/json' => 'RESTServer::parseJSON',
✦ 'application/vnd.php.serialized' => 'RESTServer::parsePHP',
28. My view on the future of services -
3.x
✦ The old RPC-oriented methods are
completely removed and are replaced by
resources.
✦ Possibly support translation of method
declarations to a resource with actions.
✦ Endpoints: modules and administrators will
be able to publish and configure servers on
arbitrary locations in the menu system.
29. Why endpoints?
Today all installed services are
always available on all installed
servers and they all have to use
the same auth method.
30. Why Endpoints?
✦ Today it’s not possible for modules to use services
to expose an API.
✦ API = services + server + authentication
mechanism
✦ Or rather - only one API can be exposed at a time
✦ This becomes a problem if services is going to be
used as a framework for other modules to publish
API:s
31. Endpoints
✦ Can be configured independently of each other.
And you can choose:
✦ which server that should be used, and what
path its should be placed on
✦ exactly what services should be exposed
✦ what authentication module that should be
used, and how it should be configured
32. Endpoints makes it possible to
✦ Expose several different API:s on one Drupal
install
✦ Define an API in your module that will
become available when the module is
installed.
✦ Package your API as a feature, this is
planned to be supported through chaos
tools.
35. OAuth and Endpoints
✦ OAuth now has support for contexts.
✦ Consumers are always placed in a context
✦ Authentications are therefore only valid
within this context.
✦ Each context has it’s own authorization levels
✦ Endpoints in services can either use separate
contexts or share contexts.
36. OAuth context declaration in code
<?php
/**
* Implementation of hook_oauth_default_contexts().
*/
function conglomerate_oauth_default_contexts
conglomerate_oauth_default_contexts() {
return array
array(
'conglomerate' => array
array(
'*' => array
array(
'title' => 'Yes, I want to connect !appname to !sitename',
'description' => 'This will allow your site !appname to push content to !sitename',
'weight' => - 1,
),
'read' => array
array(
'title' => 'I want to connect, but just to get stuff from !sitename',
'description' => 'This will allow !appname to fetch content from !sitename, but it will not
allow any information to be pushed to !sitename.',
'weight' => 0,
),
)
);
}
/**
37. Hugo Wetterberg
@hugowett
hugo@goodold.se
http://github.com/hugowetterberg