Giter Club home page Giter Club logo

twitter-client-aws-lambda's Introduction

Twitter client proxy AWS lambda

This is a lambda which can be used to proxy requests to Twitter's API, using AWS Lambda. It uses BoyCook/TwitterJSClient to make. limited, but 100% compliant API calls and can be easily extended to do more.

Live demo via AWS Gateway API endpoint

Installation

Clone this repository and install the missing npm packages.

cd twitter-client-aws-lambda
npm install

Deploying to AWS lambda

Before deploying, make sure that you have configured config.js and replaced the required API keys with yours.

In order to deploy the package, either use the aws-cli tool or zip the contents of the repository (node_modules included!) and upload them to AWS lambda using the user interface

API Specs

Since this is a proxy service, it is going to need an AWS Gateway API endpoint to be generated for it eventually. The HTTP API, performs differently and accepts different parameters based on the action provided.

This lambda is made to handle data being sent in both query strings or request body, so you can use either POST or GET for your requests to the lambda.

?action=search

This is your standard Tweet search, the API accepts the following parameters:

  • q - search string
  • max_id - used for pagination, the API will provide search_metadata.next_max_id in your search responses
  • count - amount of results to be returned
  • geocode - lonlat location with radius
  • locale - origin user locale
  • lang - search language

?action=userSearch

Search through the Twitter user accounts. Accepted parameters:

  • q - search string
  • page - search results page
  • count - number of results returned per page

?action=postsByUserId

Retrieves posts by Twitter User ID:

  • id

?action=postsByScreenName

Retrieves posts by Twitter screen name, params:

  • screen_name

?action=tweet

Retrieves a single tweet by ID, params:

  • id

twitter-client-aws-lambda's People

Contributors

mifkata avatar

Watchers

 avatar

Forkers

ashkumar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.