lfcipriani / api-rosetta-code

A community-powered collection of standalone samples of Twitter API resources implemented in several combinations of languages and libraries that abstract Twitter API access.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API Rosetta Code

Inspired by Rosetta Code, this repository is a community-powered collection of standalone samples of Twitter API resources implemented in several combinations of languages and libraries that abstract Twitter API access.

The samples are organized as follows:

- samples
  |- use case 1
  |  |- language1-library1
  |  |- language1-library2
  |  |- language2
  |  \- language2-library-3
  \- use case 2
     \- ..

The script build_index.py relies on that directory structure to generate the javascript code that powers the website and dynamic filtering found at the website.

How to run a sample

  • Copy credentials.txt.sample to credentials.txt
  • Fill it with the API keys obtained at apps.twitter.com
  • Choose the use case to learn at samples directory or the website
  • Choose a language + library combination
  • Follow the install and execute instructions
  • Read the code
  • Report found bugs

Contributing

  • Fork this repository
  • Use the template directory found at /samples/_template_ to create a new use case or sample
  • Respect the directory organization and naming structure
  • Implement code
  • Document and test it, don't forget to add your info in the sample contributors section
  • Run build_script.py to recreate the index for the website
  • Send the pull request

Important guidelines

  • There must be clear instructions on how to install dependencies and execute it
  • All samples must run as standalone code after following the instructions to build and install
  • There should be a script or dependency manager to install dependencies, if applicable
  • The sample code always load credentials from credentials.txt file
  • The output must to be the raw JSON returned by the request, if applicable
  • Keep use cases simple and short, one request only, single file (if possible)
  • Don't abuse on code comments, but write a legible code

Big thanks to our contributors!

Events

These were events organized to learn Twitter APIs with a specific language or platform.

This repository is a mirror copy from twitterdev version, given that it was removed from their org.

About

A community-powered collection of standalone samples of Twitter API resources implemented in several combinations of languages and libraries that abstract Twitter API access.

License:Apache License 2.0


Languages

Language:CSS 55.4%Language:JavaScript 20.7%Language:HTML 15.5%Language:Python 8.4%