DEV Community

Cover image for What resources help you to learn a new API?

What resources help you to learn a new API?

Andy Piper on January 14, 2022

In my day job, when I'm not learning things by reading and sharing here on DEV, I'm a developer advocate at Twitter. I've been doing this for quite...
Collapse
 
thelifeofrishi profile image
Rishi Mohan 🐼

Twitter API's documentation is pretty straightforward and elaborative. In the start it was slightly complicated to understand but after knowing how the API works it was easy to follow. I learnt to use v1.1 and v2 endpoints from Twitter docs only :)

Collapse
 
andypiper profile image
Andy Piper

That's good to know, thank you! Did you use any existing code libraries to work with the v2 API, or did you build directly against the API endpoints for yourself?

Collapse
 
thelifeofrishi profile image
Rishi Mohan 🐼

Yes, I'm using a third-party node library to simplify making calls. This for v2 npmjs.com/package/twitter-api-v2 and Twitjs for v1 endpoints.

I read somewhere that your team is also working on first party libraries, that would be awesome! Also are there plans for Twitter Text npmjs.com/package/twitter-text but for v2 endpoints? I'm currently working on same and planning to open-source, just want to know if you guys are also working on it.

Thread Thread
 
andypiper profile image
Andy Piper • Edited

We've certainly been thinking about building some libraries. The challenge is identifying which languages are most commonly used (I note that you're using JS). Definitely keep an eye on our news here. The community has created some really good libraries as well, as you have discovered.

For twitter-text, there should be no need for a different version - it is a text tokenizer, and the format of the text contents of Tweets themselves have not changed between v1.1 and v2, so the same logic will work. Let us know via the GitHub issues on that repo if there are specific questions about it (that comes from Twitter Engineering internally, rather than from our DevRel team, but we work together on things like this)

Thread Thread
 
thelifeofrishi profile image
Rishi Mohan 🐼

Got it, thanks!

Collapse
 
andrewbaisden profile image
Andrew Baisden

The official documentation works for me.

Collapse
 
dylanlacey profile image
Dylan Lacey

I really like flow diagrams. Show me what I'll need to do to get a specific thing working and I'm much happier.

Collapse
 
andypiper profile image
Andy Piper

Interesting, yes! I wonder if the new Mermaid support on GitHub Markdown will see more of these being used.

Collapse
 
steelwolf180 profile image
Max Ong Zong Bao

A game to apply and use your API services like Twilio quest. Quickstart tutorials that includes both video and example is good.

Collapse
 
andypiper profile image
Andy Piper

Nice to hear that you've enjoyed things like Twilio Quest πŸ›‘ I think Salesforce have done things along those lines before as well. It can be nice to have a sense of accomplishment as you progress through getting familiar with an API, I get that for sure. Thanks!

Collapse
 
andypiper profile image
Andy Piper

I think there are probably ways to enhance the Postman resources to go in this kind of direction, as well. I'll think about that.

Collapse
 
leob profile image
leob

Docs, a getting started guide with examples, API reference ... that's it really.

Collapse
 
andypiper profile image
Andy Piper

Do you often build directly on top of the β€œraw” (JSON+HTTP) API, or look for and use a library?

Collapse
 
leob profile image
leob

If there's a library available for my target programming language, then yeah I'd probably use that library rather than going "low level" (REST/HTTP/JSON).

Collapse
 
codewithpom profile image
Padmashree Jha

I love twitter API because using it I automate my tweets for 5am morning and my friends think that I am so punctual 😎😎 and I use tweepy python library which makes it even easier.

Collapse
 
devfranpr profile image
DevFranPR

With a good documentation is enough. But if you have the option to test all the functions in a sandbox is superb.