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!

Free Week Summer 2015

By Robert Mosolgo

Free Week Summer 2015

What I did during free week summer 2015: add pco-api to Check-Ins, add webhooks to pco-api & API, map pco-api to graphql

  • 781