Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jleh/tweetswithlocation
Get tweets with geolocation from Twitter Rest API
https://github.com/jleh/tweetswithlocation
Last synced: about 2 months ago
JSON representation
Get tweets with geolocation from Twitter Rest API
- Host: GitHub
- URL: https://github.com/jleh/tweetswithlocation
- Owner: jleh
- License: mit
- Created: 2016-01-31T13:31:45.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-31T16:16:13.000Z (almost 9 years ago)
- Last Synced: 2024-04-14T07:46:08.774Z (9 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tweetsWithLocation
Get tweets with geolocation from Twitter Rest API.App makes call to Twitter search api and filters tweets with geolocation from request.
Fetched tweets are cached and stored to Redis.## Configuration
App is configured with enviroment variables:
| Name | Value | Default value |
| --- | --- | --- |
| REDIS_URL | Redis DB URL | - |
| QUERY_CACHE_TIME | Minimum time between Twitter API calls in seconds | 60 |
| ALLOW_ORIGIN | Access-Control-Allow-Origin header value | '*' |
| TWITTER_SEARCH_STRING | Twitter search query parameter ([Read more](https://dev.twitter.com/rest/public/search)) | 'Helsinki' |
| TWITTER_CONSUMER_KEY | App consumer key | - |
| TWITTER_CONSUMER_SECRET | App secret key | - |## How to run
```bash
npm install
npm start
```
Open `http://localhost:3000/`There is also `http://localhost:3000/saved` endpoint which returns tweets from cache without calling the api.
For now it's not possible to clear cache with this app. Tweets are stored in `tweets` hash.