PCO free week 2015

PCO-API  + check-ins

 

pco-api + Zapier 

 

pco-aPi + GraphQL

PCO-api + Check-ins

Describe objects &

relationships in the app 

16 Vertices

    CheckInVertex

    LocationVertex

    LocationEventTimeVertex

   

61 Edges 

    OrganizationCheckInsEdge

    EventPeriodEventTimesEdge 

    LocationEventTimeCheckInsEdge


          Organization 
         /       |     \
        /        |      \
       /         |       \ 
    People       |       Events  
      |          |      /     \
      |          |     /       \
 PersonEvents    |  Locations   EventPeriods
                 |                  |   
              CheckIns              |
              /   |    \         EventTimes
             /    |     \ 
            /     |      \
       Person  Location  Checked-in-by 
                            (Person)

Pco-API + Zapier

"Can you email me when...?"

Pco-API + Zapier Implementation

  • pco-api: 
    • Bundles ActiveJob 
    • Implements Webhook & WebhookJob for use by the client 
    • Defines Webhook::SECRET for authenticating trigger requests 

 

  • Server (API) must: 
    • Have a `Webhook` with the right name (eg `new_check_in`)
    • `POST /webhooks/trigger`, with header Webhook::SECRET

 

Pco-API + Zapier Implementation

  • Client (eg, Check-Ins) must: 
    • Bundle `pco-api` & implement endpoints 
    • Implement an ActiveJob backend 
    • Call `PCO::API::Webhook.trigger_notification` with a resource URL 

 

  • Zapier must:
    • Authenticate as an OAuth2 app 
    • Map from JSON-API to flat JS objects 

PCO-API + GraphQL

PCO-API + GraphQL

git co graphql-api && pb bundle && pb apprestart && open http://check-ins.pco.dev/graphql/queries/new

The end

Thanks Tim!

Made with Slides.com