SlideShare a Scribd company logo
1 of 120
A REST API for  Content Management baking semantic web access into non-geek services
Stephen Howard Athens, Georgia [email_address] http://enterity.com
a presentation in 3 acts
a presentation in 3 acts what is renao?
a presentation in 3 acts what is renao? the renao API
a presentation in 3 acts what is renao? the renao API building a community
act 1 what is renao?
renao [ren- ah -oh], adj. what is renao? From Mandarin.  Lierally " hot " but also includes "noisy," "making noise," and "stirring up trouble.” In China the term is a positive, implying " lively, festive, happy, noisy " - especially noisy! from  In Other Words  by Christopher J. Moore http://myrenao.com/what
renao [ren- ah -oh], n. A hosted content management service http://myrenao.com
content management what is renao?
content management what is renao?
design management what is renao?
design management what is renao?
flexible results what is renao?
three guiding principles what is renao?
three guiding principles what is renao? content has structure
three guiding principles what is renao? content has structure  URLs are nouns
three guiding principles what is renao? content has structure  URLs are nouns templates for many formats
1: content has structure what is renao: 3 guiding principles
1: content has structure what is renao: 3 guiding principles most organizations have collections of things (resources), physical or conceptual, that they want to publish online
1: content has structure what is renao: 3 guiding principles most organizations have collections of things (resources), physical or conceptual, that they want to publish online these resources usually have a consistent set of structured or semi-structured information
1: content has structure what is renao: 3 guiding principles most organizations have collections of things (resources), physical or conceptual, that they want to publish online these resources usually have a consistent set of structured or semi-structured information let them use these structures they’re already familiar with when adding content to their sites
1: content has structure what is renao: 3 guiding principles most organizations have collections of things (resources), physical or conceptual, that they want to publish online these resources usually have a consistent set of structured or semi-structured information let them use these structures they’re already familiar with when adding content to their sites a better format for machines to understand than flat html pages.
2: URL s are nouns what is renao: 3 guiding principles
2: URL s are nouns what is renao: 3 guiding principles URL s can refer to a specific resource http://example.com/about_us http://example.com/blog/designing_an_api
2: URL s are nouns what is renao: 3 guiding principles or a list of resources URL s can refer to a specific resource http://example.com/Articles http://example.com/about_us http://example.com/blog/designing_an_api
2: URL s are nouns what is renao: 3 guiding principles use query parameters to refine your results or a list of resources URL s can refer to a specific resource /Articles?name[like]=perl&sort=publish_date,desc http://example.com/Articles http://example.com/about_us http://example.com/blog/designing_an_api
2: URL s are nouns what is renao: 3 guiding principles or use the full-text search parameter instead http://example.com?q=perl http://example.com/blog?q=perl use query parameters to refine your results or a list of resources URL s can refer to a specific resource /Articles?name[like]=perl&sort=publish_date,desc http://example.com/Articles http://example.com/about_us http://example.com/blog/designing_an_api
2: URL s are nouns what is renao: 3 guiding principles or use the full-text search parameter instead http://example.com?q=perl http://example.com/blog?q=perl special shortcut  URL s for tags use query parameters to refine your results or a list of resources URL s can refer to a specific resource http://example.com/Articles/t/perl http://example.com/blog/t/perl /Articles?name[like]=perl&sort=publish_date,desc http://example.com/Articles http://example.com/about_us http://example.com/blog/designing_an_api
3: templates for many formats what is renao: 3 guiding principles how renao picks from your templates for a given request:
3: templates for many formats what is renao: 3 guiding principles how renao picks from your templates for a given request: /article.html what kind of resource is it?
3: templates for many formats what is renao: 3 guiding principles how renao picks from your templates for a given request: /resource.html can’t find a template for that resource type? look for a template for the parent resource type. /article.html what kind of resource is it?
3: templates for many formats what is renao: 3 guiding principles how renao picks from your templates for a given request: /articles.html is the request for a list of resources? /resource.html can’t find a template for that resource type? look for a template for the parent resource type. /article.html what kind of resource is it?
3: templates for many formats what is renao: 3 guiding principles how renao picks from your templates for a given request: check for template / blog/article.html otherwise use  /article.html what collection is the resource in? /articles.html is the request for a list of resources? /resource.html can’t find a template for that resource type? look for a template for the parent resource type. /article.html what kind of resource is it?
3: templates for many formats what is renao: 3 guiding principles how renao picks from your templates for a given request: ends in .xml?  -> use  /article.xml is there a specific extension on the url? check for template / blog/article.html otherwise use  /article.html what collection is the resource in? /articles.html is the request for a list of resources? /resource.html can’t find a template for that resource type? look for a template for the parent resource type. /article.html what kind of resource is it?
a presentation in 3 acts what is renao? the renao API building a community
act 2 the renao API
API  objectives the renao API
API  objectives the renao API access your own site
API  objectives the renao API access your own site write software for others to use
API  objectives the renao API access your own site write software for others to use your site is your API, no special urls
API  objectives the renao API access your own site write software for others to use your site is your API, no special urls manage content and design
API  objectives the renao API access your own site write software for others to use your site is your API, no special urls manage content and design single authentication scheme
1: access your own site the renao API: objectives
1: access your own site the renao API: objectives update your site to reflect activities around the web
1: access your own site the renao API: objectives update your site to reflect activities around the web update  other  sites and services to reflect changes on your site
1: access your own site the renao API: objectives update your site to reflect activities around the web update  other  sites and services to reflect changes on your site integrate with your own software projects
1: access your own site the renao API: objectives update your site to reflect activities around the web update  other  sites and services to reflect changes on your site integrate with your own software projects tools and shortcuts that better match how you work.
2: write software for others the renao API: objectives
2: write software for others the renao API: objectives integrate Renao into existing software
2: write software for others the renao API: objectives integrate Renao into existing software create convenience tools
2: write software for others the renao API: objectives integrate Renao into existing software create convenience tools bookmarklets
2: write software for others the renao API: objectives integrate Renao into existing software create convenience tools bookmarklets browser plugins
2: write software for others the renao API: objectives integrate Renao into existing software create convenience tools bookmarklets browser plugins desktop apps
2: write software for others the renao API: objectives integrate Renao into existing software  create convenience tools bookmarklets browser plugins desktop apps start a business
3: your site is your  API the renao API: objectives
3: your site is your  API the renao API: objectives Minimize the amount of extra code to support an API
3: your site is your  API the renao API: objectives Minimize the amount of extra code to support an API Minimize the number of API-specific urls
3: your site is your  API the renao API: objectives Minimize the amount of extra code to support an API Minimize the number of API-specific urls Use REST so talking to API users is nearly the same as talking to site visitors
4: manage content and design the renao API: objectives
4: manage content and design the renao API: objectives provide alternative interfaces for site owners
4: manage content and design the renao API: objectives provide alternative interfaces for site owners desktop apps for richer design file editing
4: manage content and design the renao API: objectives ,[object Object],[object Object],[object Object]
4: manage content and design the renao API: objectives ,[object Object],[object Object],[object Object],[object Object]
4: manage content and design the renao API: objectives ,[object Object],[object Object],[object Object],[object Object],[object Object]
4: manage content and design the renao API: objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
4: manage content and design the renao API: objectives Caveat managing design files will probably violate the “no special urls” API rule.
4: manage content and design the renao API: objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5: single authentication scheme the renao API: objectives
5: single authentication scheme the renao API: objectives OAuth
5: single authentication scheme the renao API: objectives OAuth 3-legged provide access on behalf of another user never have to ask for or store the user’s username and password User grants you an access-token which they have the power to revoke at a later date
5: single authentication scheme the renao API: objectives OAuth 2-legged skip access-token dance send token-less OAuth requests for resources on your own sites 3-legged provide access on behalf of another user never have to ask for or store the user’s username and password User grants you an access-token which they have the power to revoke at a later date
single authentication scheme the renao API: objectives http://oauth.net/core/1.0
integrating the API the renao API session cleanup PerlCleanupHandler logging PerlLogHandler code written with REST in mind the main event PerlResponseHandler cookies or OAuth? initialize session PerlAccessHandler map url to resource(s) PerlTransHandler request_method browser fix-up map domain to site and account PerlInitHandler for  API  compatibility for all requests apache request cycle
using the renao API the renao API
using the renao API actions are HTTP Requests the renao API
using the renao API actions are HTTP Requests GET, HEAD, PUT, POST, DELETE the renao API
using the renao API actions are HTTP Requests GET, HEAD, PUT, POST, DELETE act on the URLs on your site the renao API
using the renao API actions are HTTP Requests GET, HEAD, PUT, POST, DELETE act on the URLs on your site OAuth for tasks that require authorization the renao API
using the renao API actions are HTTP Requests GET, HEAD, PUT, POST, DELETE act on the URLs on your site OAuth for tasks that require authorization account with developer key   and passcode the renao API
sometimes you can get stuff done without authenticating the renao API: examples <h3> <a href= &quot;http://myrenao.com/discuss&quot;   class= &quot;recent_topics&quot; > Recent Community Discussion Topics </a> <img src= &quot;/graphics/icons/go.png&quot;   alt= &quot;go&quot;   /> </h3> <h3> <a href= &quot; http://enterity.myrenao.com/blog &quot;   class= &quot;recent_topics&quot; > Recent Blog Posts </a> <img src= &quot;/graphics/icons/go.png&quot;   alt= &quot;go&quot;   /> </h3> (1 of 3)
sometimes you can get stuff done without authenticating the renao API: examples // JSONP request with jQuery ----------------- Widget.RecentTopics  = function( link ) { var  baseurl_regex  =  new   RegExp ( &quot;(http://[^/]+)&quot; ); var  baseurl   =  link .href. match (baseurl_regex)[ 0 ]; $. getJSON (  link .href +  '.jsonp?jsoncallback=?' , function( resources ){ for( var  i = 0 ;  i  <  resources .length;  i ++ ) { var  name  =  resources [i].subject ||  resources [i].name; $( link ). parent ().after( '<h4><a href=&quot;' + baseurl + resources [ i ].uri+ '&quot;>' + name + '</a></h4>’ ); } }) } // hook into the html ----------------- $ (function(){ $ ( 'a.recent_topics' ). each (function(){  Widget.RecentTopics ( this ); }); }); (2 of 3)
sometimes you can get stuff done without authenticating the renao API: examples [%  # template: collection.jsonp ---- cgi . param ( 'jsoncallback' );  ‘(‘ ; # get the 10 most recent resources from this collection ---- USE  Resources ; resources  =  Resources . retrieve ( 'Resource' , { inclusive  =>  1 , range  => { offset =>  0 , limit  =>  10 }, sort  => [ 'publish_date' ,  'desc' ], conditions => [ 'in' ,  'collections' ,  collection .id] }); # output each resource in json format ---- FOREACH  resource  =  resources ; PROCESS  resource.json ; ','  UNLESS  loop . last ; END; %] ) (3 of 3)
using Perl and Net::OAuth the renao API: examples use  Net::OAuth ; use  LWP::UserAgent ; use  HTTP::Request::Common ; use  Digest::MD5  qw( md5_hex ); my  $site   =  'stephen.myrenao.com' ; my  $url   =  '/blog/Articles.json'; my  $oauth_consumer_key   =  '848b9908df07dcdcb' ; my  $oauth_consumer_secret  =  '7aeaded3671776407' ;  # create OAuth Signature ----------------- my  $oauth  =  Net::OAuth -> request ( 'consumer' )-> new ( request_url  =>  $url , request_method  =>  'POST' , consumer_key  =>  $oauth_consumer_key , consumer_secret  =>  $oauth_consumer_secret , signature_method =>  'HMAC-SHA1' , timestamp  =>  time , nonce  =>  md5_hex (  $oauth_consumer_key ,  time  ), ); $oauth -> sign ; (1 of 2)
using Perl and Net::OAuth the renao API: examples # make HTTP Request ----------------- my  $response  =  LWP::UserAgent -> new -> request ( POST   &quot;http:// $site$url &quot; , Authorization =>  $oauth -> to_authorization_header , Content  => { alias  =>  'testing_oauth' , name  =>  'testing my api' , body  =>  'This is a test of the Renao API' , commentable =>  1 } ); # handle HTTP Response ----------------- print  $response -> is_success ?  &quot;successfully posted to site  &quot; :  &quot;something went wrong  ” ; print  $response -> status_line   .  &quot;  ” .  $response -> decoded_content  .  &quot;  &quot; ; (2 of 2)
future API plans the renao API
future API plans the renao API accept data in more formats
future API plans the renao API accept data in more formats use headers to determine default response format
future API plans the renao API accept data in more formats use headers to determine default response format add device/screen-size detection for template selection
1: accept data in more formats the renao API: future plans Check the content-type header on requests and parse body appropriately.
1: accept data in more formats the renao API: future plans ,[object Object],[object Object],[object Object],[object Object],[object Object]
2: use headers to determine default response format No format extension on the url? Use HTTP Accept header to determine response format the renao API: future plans http://example.com/about_us
3: device/screen-size detection the renao API: future plans
3: device/screen-size detection the renao API: future plans All devices use the same urls and domains
3: device/screen-size detection the renao API: future plans All devices use the same urls and domains Use HTTP User-Agent header to look up templates particular for the device or class of device
3: device/screen-size detection the renao API: future plans All devices use the same urls and domains Use HTTP User-Agent header to look up templates particular for the device or class of device Eliminates the need to maintain multiple copies or interfaces to your content for different devices
a presentation in 3 acts what is renao? the renao API building a community
act 3 building a community
examples building a community mashups Google Maps themes plugins Wordpress web apps desktop clients twitter desktop photo app integration web mashups extended services (printing) flickr
why build a community? building a community
why build a community? power users (designers and developers) can amplify and spread your work building a community
why build a community? power users (designers and developers) can amplify and spread your work service users can help each other out to excel at using the service to accomplish their goals building a community
why build a community? power users (designers and developers) can amplify and spread your work service users can help each other out to excel at using the service to accomplish their goals provides a group of people passionate about the service that won’t hesitate to provide an ongoing reality-check to you building a community
“ create more value than you capture” - Tim O’Reilly building a community
how to attract a community? some ideas building a community
how to attract a community? some ideas provide an online venue for the community to gather building a community
how to attract a community? some ideas provide an online venue for the community to gather cultivate an atmosphere of helpfulness among service users building a community
how to attract a community? some ideas provide an online venue for the community to gather cultivate an atmosphere of helpfulness among service users affiliate program building a community
how to attract a community? some ideas provide an online venue for the community to gather cultivate an atmosphere of helpfulness among service users affiliate program provide features that will attract power users building a community
features for power users ideas for designers building a community
features for power users ideas for designers allow for complete design flexibility building a community
features for power users ideas for designers allow for complete design flexibility user-contributed themes gallery building a community
features for power users ideas for designers allow for complete design flexibility user-contributed themes gallery free “project starter” sites for new client sites building a community
features for power users ideas for developers building a community
features for power users ideas for developers an API that is easy to understand and write for building a community
features for power users ideas for developers an API that is easy to understand and write for good API documentation building a community
features for power users ideas for developers an API that is easy to understand and write for good API documentation low barriers to getting started building a community
a presentation in 3 acts what is renao? the renao API building a community fin.
Thanks http://myrenao.com [email_address]
discussion:   how do you attract a community  around a service? http://myrenao.com [email_address]

More Related Content

What's hot

The Google Hacking Database: A Key Resource to Exposing Vulnerabilities
The Google Hacking Database: A Key Resource to Exposing VulnerabilitiesThe Google Hacking Database: A Key Resource to Exposing Vulnerabilities
The Google Hacking Database: A Key Resource to Exposing VulnerabilitiesTechWell
 
Leveraging Plone for Search Engine Optimization (SEO)
Leveraging Plone for Search Engine Optimization (SEO)Leveraging Plone for Search Engine Optimization (SEO)
Leveraging Plone for Search Engine Optimization (SEO)Heather Wozniak
 
What Is Seo How Search Engine Works
What Is Seo How Search Engine WorksWhat Is Seo How Search Engine Works
What Is Seo How Search Engine WorksAddithink
 
Introduction to Facebook Javascript SDK (NEW)
Introduction to Facebook Javascript SDK (NEW)Introduction to Facebook Javascript SDK (NEW)
Introduction to Facebook Javascript SDK (NEW)Colin Su
 
Learning Wordpress - the internal guide
Learning Wordpress - the internal guideLearning Wordpress - the internal guide
Learning Wordpress - the internal guidetom altman
 
Affiliate Marketing
Affiliate MarketingAffiliate Marketing
Affiliate MarketingElmanhossen
 
Kiran karnad rtc2014 ghdb-final
Kiran karnad rtc2014 ghdb-finalKiran karnad rtc2014 ghdb-final
Kiran karnad rtc2014 ghdb-finalRomania Testing
 
Research on Key Technology of Web Reptile
Research on Key Technology of Web ReptileResearch on Key Technology of Web Reptile
Research on Key Technology of Web ReptileIRJESJOURNAL
 

What's hot (9)

The Google Hacking Database: A Key Resource to Exposing Vulnerabilities
The Google Hacking Database: A Key Resource to Exposing VulnerabilitiesThe Google Hacking Database: A Key Resource to Exposing Vulnerabilities
The Google Hacking Database: A Key Resource to Exposing Vulnerabilities
 
Leveraging Plone for Search Engine Optimization (SEO)
Leveraging Plone for Search Engine Optimization (SEO)Leveraging Plone for Search Engine Optimization (SEO)
Leveraging Plone for Search Engine Optimization (SEO)
 
What Is Seo How Search Engine Works
What Is Seo How Search Engine WorksWhat Is Seo How Search Engine Works
What Is Seo How Search Engine Works
 
Introduction to Facebook Javascript SDK (NEW)
Introduction to Facebook Javascript SDK (NEW)Introduction to Facebook Javascript SDK (NEW)
Introduction to Facebook Javascript SDK (NEW)
 
Learning Wordpress - the internal guide
Learning Wordpress - the internal guideLearning Wordpress - the internal guide
Learning Wordpress - the internal guide
 
Affiliate Marketing
Affiliate MarketingAffiliate Marketing
Affiliate Marketing
 
Google
GoogleGoogle
Google
 
Kiran karnad rtc2014 ghdb-final
Kiran karnad rtc2014 ghdb-finalKiran karnad rtc2014 ghdb-final
Kiran karnad rtc2014 ghdb-final
 
Research on Key Technology of Web Reptile
Research on Key Technology of Web ReptileResearch on Key Technology of Web Reptile
Research on Key Technology of Web Reptile
 

Viewers also liked

Givingawaymoney 110620025907-phpapp02
Givingawaymoney 110620025907-phpapp02Givingawaymoney 110620025907-phpapp02
Givingawaymoney 110620025907-phpapp02tallisstudent
 
Wcf rest api introduction
Wcf rest api introductionWcf rest api introduction
Wcf rest api introductionHimanshu Desai
 
Overview of Responsive Web Design
Overview of Responsive Web DesignOverview of Responsive Web Design
Overview of Responsive Web DesignPankaj Bajaj
 
Introduction to REST - API
Introduction to REST - APIIntroduction to REST - API
Introduction to REST - APIChetan Gadodia
 
joshua&cal sealed knot powerpoint
joshua&cal sealed knot powerpointjoshua&cal sealed knot powerpoint
joshua&cal sealed knot powerpointtallisstudent
 
5th Annual Global Diversity Seminar Barcelona Abercrombie & Fitch
5th Annual Global Diversity Seminar Barcelona Abercrombie & Fitch5th Annual Global Diversity Seminar Barcelona Abercrombie & Fitch
5th Annual Global Diversity Seminar Barcelona Abercrombie & FitchIcon Group Innovations
 
Bruce-輕鬆上手Asp.net web api 2.1.2
Bruce-輕鬆上手Asp.net web api 2.1.2Bruce-輕鬆上手Asp.net web api 2.1.2
Bruce-輕鬆上手Asp.net web api 2.1.2Study4TW
 
Ormita partly media on barter(beijing, shanghai & hongkong)
Ormita partly media on barter(beijing, shanghai & hongkong)Ormita partly media on barter(beijing, shanghai & hongkong)
Ormita partly media on barter(beijing, shanghai & hongkong)Cathyouyang
 

Viewers also liked (8)

Givingawaymoney 110620025907-phpapp02
Givingawaymoney 110620025907-phpapp02Givingawaymoney 110620025907-phpapp02
Givingawaymoney 110620025907-phpapp02
 
Wcf rest api introduction
Wcf rest api introductionWcf rest api introduction
Wcf rest api introduction
 
Overview of Responsive Web Design
Overview of Responsive Web DesignOverview of Responsive Web Design
Overview of Responsive Web Design
 
Introduction to REST - API
Introduction to REST - APIIntroduction to REST - API
Introduction to REST - API
 
joshua&cal sealed knot powerpoint
joshua&cal sealed knot powerpointjoshua&cal sealed knot powerpoint
joshua&cal sealed knot powerpoint
 
5th Annual Global Diversity Seminar Barcelona Abercrombie & Fitch
5th Annual Global Diversity Seminar Barcelona Abercrombie & Fitch5th Annual Global Diversity Seminar Barcelona Abercrombie & Fitch
5th Annual Global Diversity Seminar Barcelona Abercrombie & Fitch
 
Bruce-輕鬆上手Asp.net web api 2.1.2
Bruce-輕鬆上手Asp.net web api 2.1.2Bruce-輕鬆上手Asp.net web api 2.1.2
Bruce-輕鬆上手Asp.net web api 2.1.2
 
Ormita partly media on barter(beijing, shanghai & hongkong)
Ormita partly media on barter(beijing, shanghai & hongkong)Ormita partly media on barter(beijing, shanghai & hongkong)
Ormita partly media on barter(beijing, shanghai & hongkong)
 

Similar to A REST API for Content Management

Web API Design: Crafting Interfaces that Developers Love
Web API Design:  Crafting Interfaces that Developers LoveWeb API Design:  Crafting Interfaces that Developers Love
Web API Design: Crafting Interfaces that Developers LoveJamison K. Bell | OvenPOP 360
 
Moving into API documentation writing
Moving into API documentation writingMoving into API documentation writing
Moving into API documentation writingEllis Pratt
 
Beyond the Theme - Using WordPress as an API
Beyond the Theme - Using WordPress as an APIBeyond the Theme - Using WordPress as an API
Beyond the Theme - Using WordPress as an APIDavid Tufts
 
O'Reilly SACon San Jose, CA - 2019 - API design tutorial
O'Reilly SACon San Jose, CA - 2019 - API design tutorialO'Reilly SACon San Jose, CA - 2019 - API design tutorial
O'Reilly SACon San Jose, CA - 2019 - API design tutorialTom Hofte
 
The Power of Open Data
The Power of Open DataThe Power of Open Data
The Power of Open DataPhil Windley
 
Cms Workshop Long
Cms Workshop LongCms Workshop Long
Cms Workshop Longemily
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developersPatrick Savalle
 
Session4 pl online_course_30_september2011
Session4  pl online_course_30_september2011Session4  pl online_course_30_september2011
Session4 pl online_course_30_september2011LeslieOflahavan
 
Real world RESTful service development problems and solutions
Real world RESTful service development problems and solutionsReal world RESTful service development problems and solutions
Real world RESTful service development problems and solutionsBhakti Mehta
 
Ruby on Rails Plugins - Rich Collins
Ruby on Rails Plugins - Rich CollinsRuby on Rails Plugins - Rich Collins
Ruby on Rails Plugins - Rich CollinsRich Collins
 
BarCamb Connotea by Ian Mulvany
BarCamb Connotea by Ian MulvanyBarCamb Connotea by Ian Mulvany
BarCamb Connotea by Ian MulvanyIan Mulvany
 
Web REST APIs Design Principles
Web REST APIs Design PrinciplesWeb REST APIs Design Principles
Web REST APIs Design PrinciplesAnji Beeravalli
 
2011 10-05-virtual user group
2011 10-05-virtual user group2011 10-05-virtual user group
2011 10-05-virtual user groupjhennelly
 
Great APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGreat APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGabriel Lucaciu
 
Creating a World-Class RESTful Web Services API
Creating a World-Class RESTful Web Services APICreating a World-Class RESTful Web Services API
Creating a World-Class RESTful Web Services APIDavid Keener
 
search engine best ppt
search engine best pptsearch engine best ppt
search engine best pptpoppo10
 
API_Design_Rest_Princple.pdf
API_Design_Rest_Princple.pdfAPI_Design_Rest_Princple.pdf
API_Design_Rest_Princple.pdfHuan Le Trong
 

Similar to A REST API for Content Management (20)

Web API Design
Web API DesignWeb API Design
Web API Design
 
Web API Design: Crafting Interfaces that Developers Love
Web API Design:  Crafting Interfaces that Developers LoveWeb API Design:  Crafting Interfaces that Developers Love
Web API Design: Crafting Interfaces that Developers Love
 
Moving into API documentation writing
Moving into API documentation writingMoving into API documentation writing
Moving into API documentation writing
 
Beyond the Theme - Using WordPress as an API
Beyond the Theme - Using WordPress as an APIBeyond the Theme - Using WordPress as an API
Beyond the Theme - Using WordPress as an API
 
O'Reilly SACon San Jose, CA - 2019 - API design tutorial
O'Reilly SACon San Jose, CA - 2019 - API design tutorialO'Reilly SACon San Jose, CA - 2019 - API design tutorial
O'Reilly SACon San Jose, CA - 2019 - API design tutorial
 
The Power of Open Data
The Power of Open DataThe Power of Open Data
The Power of Open Data
 
Cms Workshop Long
Cms Workshop LongCms Workshop Long
Cms Workshop Long
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
 
Session4 pl online_course_30_september2011
Session4  pl online_course_30_september2011Session4  pl online_course_30_september2011
Session4 pl online_course_30_september2011
 
Real world RESTful service development problems and solutions
Real world RESTful service development problems and solutionsReal world RESTful service development problems and solutions
Real world RESTful service development problems and solutions
 
REST API Basics
REST API BasicsREST API Basics
REST API Basics
 
Ruby on Rails Plugins - Rich Collins
Ruby on Rails Plugins - Rich CollinsRuby on Rails Plugins - Rich Collins
Ruby on Rails Plugins - Rich Collins
 
BarCamb Connotea by Ian Mulvany
BarCamb Connotea by Ian MulvanyBarCamb Connotea by Ian Mulvany
BarCamb Connotea by Ian Mulvany
 
API presentation
API presentationAPI presentation
API presentation
 
Web REST APIs Design Principles
Web REST APIs Design PrinciplesWeb REST APIs Design Principles
Web REST APIs Design Principles
 
2011 10-05-virtual user group
2011 10-05-virtual user group2011 10-05-virtual user group
2011 10-05-virtual user group
 
Great APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGreat APIs - Future of Your Progress App
Great APIs - Future of Your Progress App
 
Creating a World-Class RESTful Web Services API
Creating a World-Class RESTful Web Services APICreating a World-Class RESTful Web Services API
Creating a World-Class RESTful Web Services API
 
search engine best ppt
search engine best pptsearch engine best ppt
search engine best ppt
 
API_Design_Rest_Princple.pdf
API_Design_Rest_Princple.pdfAPI_Design_Rest_Princple.pdf
API_Design_Rest_Princple.pdf
 

Recently uploaded

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

A REST API for Content Management

  • 1. A REST API for Content Management baking semantic web access into non-geek services
  • 2. Stephen Howard Athens, Georgia [email_address] http://enterity.com
  • 4. a presentation in 3 acts what is renao?
  • 5. a presentation in 3 acts what is renao? the renao API
  • 6. a presentation in 3 acts what is renao? the renao API building a community
  • 7. act 1 what is renao?
  • 8. renao [ren- ah -oh], adj. what is renao? From Mandarin. Lierally &quot; hot &quot; but also includes &quot;noisy,&quot; &quot;making noise,&quot; and &quot;stirring up trouble.” In China the term is a positive, implying &quot; lively, festive, happy, noisy &quot; - especially noisy! from In Other Words by Christopher J. Moore http://myrenao.com/what
  • 9. renao [ren- ah -oh], n. A hosted content management service http://myrenao.com
  • 15. three guiding principles what is renao?
  • 16. three guiding principles what is renao? content has structure
  • 17. three guiding principles what is renao? content has structure URLs are nouns
  • 18. three guiding principles what is renao? content has structure URLs are nouns templates for many formats
  • 19. 1: content has structure what is renao: 3 guiding principles
  • 20. 1: content has structure what is renao: 3 guiding principles most organizations have collections of things (resources), physical or conceptual, that they want to publish online
  • 21. 1: content has structure what is renao: 3 guiding principles most organizations have collections of things (resources), physical or conceptual, that they want to publish online these resources usually have a consistent set of structured or semi-structured information
  • 22. 1: content has structure what is renao: 3 guiding principles most organizations have collections of things (resources), physical or conceptual, that they want to publish online these resources usually have a consistent set of structured or semi-structured information let them use these structures they’re already familiar with when adding content to their sites
  • 23. 1: content has structure what is renao: 3 guiding principles most organizations have collections of things (resources), physical or conceptual, that they want to publish online these resources usually have a consistent set of structured or semi-structured information let them use these structures they’re already familiar with when adding content to their sites a better format for machines to understand than flat html pages.
  • 24. 2: URL s are nouns what is renao: 3 guiding principles
  • 25. 2: URL s are nouns what is renao: 3 guiding principles URL s can refer to a specific resource http://example.com/about_us http://example.com/blog/designing_an_api
  • 26. 2: URL s are nouns what is renao: 3 guiding principles or a list of resources URL s can refer to a specific resource http://example.com/Articles http://example.com/about_us http://example.com/blog/designing_an_api
  • 27. 2: URL s are nouns what is renao: 3 guiding principles use query parameters to refine your results or a list of resources URL s can refer to a specific resource /Articles?name[like]=perl&sort=publish_date,desc http://example.com/Articles http://example.com/about_us http://example.com/blog/designing_an_api
  • 28. 2: URL s are nouns what is renao: 3 guiding principles or use the full-text search parameter instead http://example.com?q=perl http://example.com/blog?q=perl use query parameters to refine your results or a list of resources URL s can refer to a specific resource /Articles?name[like]=perl&sort=publish_date,desc http://example.com/Articles http://example.com/about_us http://example.com/blog/designing_an_api
  • 29. 2: URL s are nouns what is renao: 3 guiding principles or use the full-text search parameter instead http://example.com?q=perl http://example.com/blog?q=perl special shortcut URL s for tags use query parameters to refine your results or a list of resources URL s can refer to a specific resource http://example.com/Articles/t/perl http://example.com/blog/t/perl /Articles?name[like]=perl&sort=publish_date,desc http://example.com/Articles http://example.com/about_us http://example.com/blog/designing_an_api
  • 30. 3: templates for many formats what is renao: 3 guiding principles how renao picks from your templates for a given request:
  • 31. 3: templates for many formats what is renao: 3 guiding principles how renao picks from your templates for a given request: /article.html what kind of resource is it?
  • 32. 3: templates for many formats what is renao: 3 guiding principles how renao picks from your templates for a given request: /resource.html can’t find a template for that resource type? look for a template for the parent resource type. /article.html what kind of resource is it?
  • 33. 3: templates for many formats what is renao: 3 guiding principles how renao picks from your templates for a given request: /articles.html is the request for a list of resources? /resource.html can’t find a template for that resource type? look for a template for the parent resource type. /article.html what kind of resource is it?
  • 34. 3: templates for many formats what is renao: 3 guiding principles how renao picks from your templates for a given request: check for template / blog/article.html otherwise use /article.html what collection is the resource in? /articles.html is the request for a list of resources? /resource.html can’t find a template for that resource type? look for a template for the parent resource type. /article.html what kind of resource is it?
  • 35. 3: templates for many formats what is renao: 3 guiding principles how renao picks from your templates for a given request: ends in .xml? -> use /article.xml is there a specific extension on the url? check for template / blog/article.html otherwise use /article.html what collection is the resource in? /articles.html is the request for a list of resources? /resource.html can’t find a template for that resource type? look for a template for the parent resource type. /article.html what kind of resource is it?
  • 36. a presentation in 3 acts what is renao? the renao API building a community
  • 37. act 2 the renao API
  • 38. API objectives the renao API
  • 39. API objectives the renao API access your own site
  • 40. API objectives the renao API access your own site write software for others to use
  • 41. API objectives the renao API access your own site write software for others to use your site is your API, no special urls
  • 42. API objectives the renao API access your own site write software for others to use your site is your API, no special urls manage content and design
  • 43. API objectives the renao API access your own site write software for others to use your site is your API, no special urls manage content and design single authentication scheme
  • 44. 1: access your own site the renao API: objectives
  • 45. 1: access your own site the renao API: objectives update your site to reflect activities around the web
  • 46. 1: access your own site the renao API: objectives update your site to reflect activities around the web update other sites and services to reflect changes on your site
  • 47. 1: access your own site the renao API: objectives update your site to reflect activities around the web update other sites and services to reflect changes on your site integrate with your own software projects
  • 48. 1: access your own site the renao API: objectives update your site to reflect activities around the web update other sites and services to reflect changes on your site integrate with your own software projects tools and shortcuts that better match how you work.
  • 49. 2: write software for others the renao API: objectives
  • 50. 2: write software for others the renao API: objectives integrate Renao into existing software
  • 51. 2: write software for others the renao API: objectives integrate Renao into existing software create convenience tools
  • 52. 2: write software for others the renao API: objectives integrate Renao into existing software create convenience tools bookmarklets
  • 53. 2: write software for others the renao API: objectives integrate Renao into existing software create convenience tools bookmarklets browser plugins
  • 54. 2: write software for others the renao API: objectives integrate Renao into existing software create convenience tools bookmarklets browser plugins desktop apps
  • 55. 2: write software for others the renao API: objectives integrate Renao into existing software create convenience tools bookmarklets browser plugins desktop apps start a business
  • 56. 3: your site is your API the renao API: objectives
  • 57. 3: your site is your API the renao API: objectives Minimize the amount of extra code to support an API
  • 58. 3: your site is your API the renao API: objectives Minimize the amount of extra code to support an API Minimize the number of API-specific urls
  • 59. 3: your site is your API the renao API: objectives Minimize the amount of extra code to support an API Minimize the number of API-specific urls Use REST so talking to API users is nearly the same as talking to site visitors
  • 60. 4: manage content and design the renao API: objectives
  • 61. 4: manage content and design the renao API: objectives provide alternative interfaces for site owners
  • 62. 4: manage content and design the renao API: objectives provide alternative interfaces for site owners desktop apps for richer design file editing
  • 63.
  • 64.
  • 65.
  • 66.
  • 67. 4: manage content and design the renao API: objectives Caveat managing design files will probably violate the “no special urls” API rule.
  • 68.
  • 69. 5: single authentication scheme the renao API: objectives
  • 70. 5: single authentication scheme the renao API: objectives OAuth
  • 71. 5: single authentication scheme the renao API: objectives OAuth 3-legged provide access on behalf of another user never have to ask for or store the user’s username and password User grants you an access-token which they have the power to revoke at a later date
  • 72. 5: single authentication scheme the renao API: objectives OAuth 2-legged skip access-token dance send token-less OAuth requests for resources on your own sites 3-legged provide access on behalf of another user never have to ask for or store the user’s username and password User grants you an access-token which they have the power to revoke at a later date
  • 73. single authentication scheme the renao API: objectives http://oauth.net/core/1.0
  • 74. integrating the API the renao API session cleanup PerlCleanupHandler logging PerlLogHandler code written with REST in mind the main event PerlResponseHandler cookies or OAuth? initialize session PerlAccessHandler map url to resource(s) PerlTransHandler request_method browser fix-up map domain to site and account PerlInitHandler for API compatibility for all requests apache request cycle
  • 75. using the renao API the renao API
  • 76. using the renao API actions are HTTP Requests the renao API
  • 77. using the renao API actions are HTTP Requests GET, HEAD, PUT, POST, DELETE the renao API
  • 78. using the renao API actions are HTTP Requests GET, HEAD, PUT, POST, DELETE act on the URLs on your site the renao API
  • 79. using the renao API actions are HTTP Requests GET, HEAD, PUT, POST, DELETE act on the URLs on your site OAuth for tasks that require authorization the renao API
  • 80. using the renao API actions are HTTP Requests GET, HEAD, PUT, POST, DELETE act on the URLs on your site OAuth for tasks that require authorization account with developer key and passcode the renao API
  • 81. sometimes you can get stuff done without authenticating the renao API: examples <h3> <a href= &quot;http://myrenao.com/discuss&quot; class= &quot;recent_topics&quot; > Recent Community Discussion Topics </a> <img src= &quot;/graphics/icons/go.png&quot; alt= &quot;go&quot; /> </h3> <h3> <a href= &quot; http://enterity.myrenao.com/blog &quot; class= &quot;recent_topics&quot; > Recent Blog Posts </a> <img src= &quot;/graphics/icons/go.png&quot; alt= &quot;go&quot; /> </h3> (1 of 3)
  • 82. sometimes you can get stuff done without authenticating the renao API: examples // JSONP request with jQuery ----------------- Widget.RecentTopics = function( link ) { var baseurl_regex = new RegExp ( &quot;(http://[^/]+)&quot; ); var baseurl = link .href. match (baseurl_regex)[ 0 ]; $. getJSON ( link .href + '.jsonp?jsoncallback=?' , function( resources ){ for( var i = 0 ; i < resources .length; i ++ ) { var name = resources [i].subject || resources [i].name; $( link ). parent ().after( '<h4><a href=&quot;' + baseurl + resources [ i ].uri+ '&quot;>' + name + '</a></h4>’ ); } }) } // hook into the html ----------------- $ (function(){ $ ( 'a.recent_topics' ). each (function(){ Widget.RecentTopics ( this ); }); }); (2 of 3)
  • 83. sometimes you can get stuff done without authenticating the renao API: examples [% # template: collection.jsonp ---- cgi . param ( 'jsoncallback' ); ‘(‘ ; # get the 10 most recent resources from this collection ---- USE Resources ; resources = Resources . retrieve ( 'Resource' , { inclusive => 1 , range => { offset => 0 , limit => 10 }, sort => [ 'publish_date' , 'desc' ], conditions => [ 'in' , 'collections' , collection .id] }); # output each resource in json format ---- FOREACH resource = resources ; PROCESS resource.json ; ',' UNLESS loop . last ; END; %] ) (3 of 3)
  • 84. using Perl and Net::OAuth the renao API: examples use Net::OAuth ; use LWP::UserAgent ; use HTTP::Request::Common ; use Digest::MD5 qw( md5_hex ); my $site = 'stephen.myrenao.com' ; my $url = '/blog/Articles.json'; my $oauth_consumer_key = '848b9908df07dcdcb' ; my $oauth_consumer_secret = '7aeaded3671776407' ; # create OAuth Signature ----------------- my $oauth = Net::OAuth -> request ( 'consumer' )-> new ( request_url => $url , request_method => 'POST' , consumer_key => $oauth_consumer_key , consumer_secret => $oauth_consumer_secret , signature_method => 'HMAC-SHA1' , timestamp => time , nonce => md5_hex ( $oauth_consumer_key , time ), ); $oauth -> sign ; (1 of 2)
  • 85. using Perl and Net::OAuth the renao API: examples # make HTTP Request ----------------- my $response = LWP::UserAgent -> new -> request ( POST &quot;http:// $site$url &quot; , Authorization => $oauth -> to_authorization_header , Content => { alias => 'testing_oauth' , name => 'testing my api' , body => 'This is a test of the Renao API' , commentable => 1 } ); # handle HTTP Response ----------------- print $response -> is_success ? &quot;successfully posted to site &quot; : &quot;something went wrong ” ; print $response -> status_line . &quot; ” . $response -> decoded_content . &quot; &quot; ; (2 of 2)
  • 86. future API plans the renao API
  • 87. future API plans the renao API accept data in more formats
  • 88. future API plans the renao API accept data in more formats use headers to determine default response format
  • 89. future API plans the renao API accept data in more formats use headers to determine default response format add device/screen-size detection for template selection
  • 90. 1: accept data in more formats the renao API: future plans Check the content-type header on requests and parse body appropriately.
  • 91.
  • 92. 2: use headers to determine default response format No format extension on the url? Use HTTP Accept header to determine response format the renao API: future plans http://example.com/about_us
  • 93. 3: device/screen-size detection the renao API: future plans
  • 94. 3: device/screen-size detection the renao API: future plans All devices use the same urls and domains
  • 95. 3: device/screen-size detection the renao API: future plans All devices use the same urls and domains Use HTTP User-Agent header to look up templates particular for the device or class of device
  • 96. 3: device/screen-size detection the renao API: future plans All devices use the same urls and domains Use HTTP User-Agent header to look up templates particular for the device or class of device Eliminates the need to maintain multiple copies or interfaces to your content for different devices
  • 97. a presentation in 3 acts what is renao? the renao API building a community
  • 98. act 3 building a community
  • 99. examples building a community mashups Google Maps themes plugins Wordpress web apps desktop clients twitter desktop photo app integration web mashups extended services (printing) flickr
  • 100. why build a community? building a community
  • 101. why build a community? power users (designers and developers) can amplify and spread your work building a community
  • 102. why build a community? power users (designers and developers) can amplify and spread your work service users can help each other out to excel at using the service to accomplish their goals building a community
  • 103. why build a community? power users (designers and developers) can amplify and spread your work service users can help each other out to excel at using the service to accomplish their goals provides a group of people passionate about the service that won’t hesitate to provide an ongoing reality-check to you building a community
  • 104. “ create more value than you capture” - Tim O’Reilly building a community
  • 105. how to attract a community? some ideas building a community
  • 106. how to attract a community? some ideas provide an online venue for the community to gather building a community
  • 107. how to attract a community? some ideas provide an online venue for the community to gather cultivate an atmosphere of helpfulness among service users building a community
  • 108. how to attract a community? some ideas provide an online venue for the community to gather cultivate an atmosphere of helpfulness among service users affiliate program building a community
  • 109. how to attract a community? some ideas provide an online venue for the community to gather cultivate an atmosphere of helpfulness among service users affiliate program provide features that will attract power users building a community
  • 110. features for power users ideas for designers building a community
  • 111. features for power users ideas for designers allow for complete design flexibility building a community
  • 112. features for power users ideas for designers allow for complete design flexibility user-contributed themes gallery building a community
  • 113. features for power users ideas for designers allow for complete design flexibility user-contributed themes gallery free “project starter” sites for new client sites building a community
  • 114. features for power users ideas for developers building a community
  • 115. features for power users ideas for developers an API that is easy to understand and write for building a community
  • 116. features for power users ideas for developers an API that is easy to understand and write for good API documentation building a community
  • 117. features for power users ideas for developers an API that is easy to understand and write for good API documentation low barriers to getting started building a community
  • 118. a presentation in 3 acts what is renao? the renao API building a community fin.
  • 120. discussion: how do you attract a community around a service? http://myrenao.com [email_address]