API-Craft NYC - Overview of the Twitter APIs with demos

13
Jon Bulava @jbulava Editor-in-chief, Developer Relations @Twitter. Master of web technology. Top it owith some photography and video production. Follow

Transcript of API-Craft NYC - Overview of the Twitter APIs with demos

Page 1: API-Craft NYC - Overview of the Twitter APIs with demos

Jon Bulava@jbulavaEditor-in-chief, Developer Relations @Twitter. Master of web technology. Top it off with some photography and video production.

Follow

Page 2: API-Craft NYC - Overview of the Twitter APIs with demos

- Why is Twitter important? - API overview - Organization - Rate limits - Versioning - Demos - Open discussion

AGENDA

Page 3: API-Craft NYC - Overview of the Twitter APIs with demos

- Connect your users with their interests - Distribution on a global scale - Open and real-time

WHY IS TWITTER IMPORTANT?

Page 4: API-Craft NYC - Overview of the Twitter APIs with demos

Streaming APIsREST APIs

API OVERVIEW

Ingest what’s happening right now

Perform actions

Access what happened

Page 5: API-Craft NYC - Overview of the Twitter APIs with demos

Public API Media API

Collections API TON API

API ORGANIZATION

Streaming APIsREST APIs

User streamsSite streams

Public streams

Page 6: API-Craft NYC - Overview of the Twitter APIs with demos

API ORGANIZATION

Streaming APIsREST APIs

POST statuses / filter GET statuses / sample GET statuses / firehose

User streams

Site streams

Public streams

GET site

GET user

Public APIGET statuses/user_timeline GET statuses/show/:id POST statuses/update GET search/tweets GET followers/list GET trends/place

Media APIPOST media/upload POST media/upload (INIT) POST media/upload (APPEND) POST media/upload (FINALIZE) POST media/metadata/create GET media/upload (STATUS)

Page 7: API-Craft NYC - Overview of the Twitter APIs with demos

API RATE LIMITS

Streaming APIsREST APIs

Reasons for limiting: • Backoff strategy not

implemented • Frequent breaks and

reconnecting • Too many connections

Limit notices { "limit":{ "track":1234 }}

15 minute windows

Most limits are either: • 15 calls / 15 minutes • 180 calls / 15 minutes

Page 8: API-Craft NYC - Overview of the Twitter APIs with demos

Streaming APIsREST APIs Ads APIs

API VERSIONING

Page 9: API-Craft NYC - Overview of the Twitter APIs with demos

Ads APIs

API VERSIONING

• Frequent updates means aggressive versioning • MAJOR and MINOR numbers used (e.g. 2.3) • Backward incompatible increases MAJOR • Backward compatible increases MINOR • Only need to specify MAJOR number in call

Example: https://ads-api.twitter.com/1/accounts/abc1/tailored_audiences

Page 10: API-Craft NYC - Overview of the Twitter APIs with demos

DEMO

Page 11: API-Craft NYC - Overview of the Twitter APIs with demos

Documentation dev.twitter.com

Streaming API t.co/streaming

REST API t.co/rest

DEVELOPER RESOURCES

Create App t.co/apps

Open Source Libs t.co/libs

Code Examples t.co/code

Page 12: API-Craft NYC - Overview of the Twitter APIs with demos

TwitterCommunity.com

Page 13: API-Craft NYC - Overview of the Twitter APIs with demos

Thank You@jbulava