Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danesparza/twitter-breaking-news
:squirrel: Simple breaking news microservice written in Go
https://github.com/danesparza/twitter-breaking-news
dashboard go json news-feed twitter
Last synced: about 2 months ago
JSON representation
:squirrel: Simple breaking news microservice written in Go
- Host: GitHub
- URL: https://github.com/danesparza/twitter-breaking-news
- Owner: danesparza
- License: mit
- Created: 2015-04-27T20:10:51.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-02T21:03:23.000Z (almost 9 years ago)
- Last Synced: 2024-06-19T19:41:08.551Z (7 months ago)
- Topics: dashboard, go, json, news-feed, twitter
- Language: Go
- Homepage:
- Size: 18.6 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# twitter-breaking-news [![Circle CI](https://circleci.com/gh/danesparza/twitter-breaking-news.svg?style=svg)](https://circleci.com/gh/danesparza/twitter-breaking-news)
Simple breaking news microservice written in Go### Quick Start
Grab the [latest release](https://github.com/danesparza/twitter-breaking-news/releases/latest) for your platform
or
```bash
docker pull danesparza/twitter-breaking-news:latest
```See [the dockerfile for the environment variables](https://github.com/danesparza/twitter-breaking-news/blob/master/Dockerfile#L6-L10) you'll want to use to pass information to the service
### Starting the service
To start the service, just run `twitter-breaking-news`.If you need help, just run `twitter-breaking-news --help`.
There are a few command line parameters available:
Parameter | Description
---------- | -----------
port | The port the service listens on.
allowedOrigins | comma seperated list of [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) origins to allow. In order to access the service directly from a javascript application, you'll need to specify the origin you'll be running the javascript site on. For example: http://www.myjavascriptapplication.com
consumerKey | The consumer key (API key). Get this from your [Twitter app dashboard](https://apps.twitter.com/).
consumerSecret | The consumer secret (API secret). Get this from your [Twitter app dashboard](https://apps.twitter.com/).
authToken | The auth token (Access Token). Get this from your [Twitter app dashboard](https://apps.twitter.com/).
authSecret | The auth secret (Access Token Secret). Get this from your [Twitter app dashboard](https://apps.twitter.com/).### Testing the service
Once the service is up and running, you can connect to it using
`http://yourhostname:3000/news/screenname` where `screenname` is the twitter screen name you're using to get breaking news.Example: `http://yourdomain.com:3000/news/cnnbrk`
To test your service quickly, you can use the [Postman Google Chrome Extension](https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en) to call the service and see the JSON return format.
News information will be returned as a JSON payload.
### Building from source
*To build, make sure you have the latest version of [Go](http://golang.org/) installed. If you've never used Go before, it's a quick install and [there are installers for multiple platforms](http://golang.org/doc/install), including Windows, Linux and OSX.*```bash
go get github.com/danesparza/twitter-breaking-news
go build
```