https://github.com/rohannagar/lightning
Real-Time Social Media REST API
https://github.com/rohannagar/lightning
dropwizard facebook pilot rest-api twitter
Last synced: 8 months ago
JSON representation
Real-Time Social Media REST API
- Host: GitHub
- URL: https://github.com/rohannagar/lightning
- Owner: RohanNagar
- License: mit
- Created: 2015-07-29T01:55:52.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2025-08-29T09:03:10.000Z (8 months ago)
- Last Synced: 2025-08-29T13:03:10.270Z (8 months ago)
- Topics: dropwizard, facebook, pilot, rest-api, twitter
- Language: Java
- Homepage:
- Size: 522 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README

# Lightning
[](https://travis-ci.com/RohanNagar/lightning)
[](https://coveralls.io/github/RohanNagar/lightning?branch=master)
[](https://github.com/RohanNagar/lightning/releases)
[](http://twitter.com/RohanNagar22)
Lightning is a real-time social media REST API, to be used in conjunction with [Thunder](https://github.com/RohanNagar/thunder). Lightning provides methods to request data from various 3rd party social media and cloud services, including Facebook and Twitter.
* [Endpoints](https://github.com/RohanNagar/lightning/wiki/Available-Endpoints)
* [Running Locally](#running-locally)
* [Testing](#testing)
* [Changelog](https://github.com/RohanNagar/lightning/wiki/Changelog)
## Running Locally
- Requirements
- Java 1.8
- Maven 3.3.3
First, fork this repo on GitHub. Then, clone your forked repo onto your machine.
```bash
$ git clone YOUR-FORK-URL
```
Compile and package the source code with Maven.
```bash
$ mvn package
```
Run the packaged jar with the server argument.
```bash
$ java -jar application/target/application-*.jar server
```
Lightning should now be running on localhost port 9000.
## Testing
There is a Python testing script available in the `scripts` directory. To run this script, make sure you are in the base lightning directory and run the following command.
```bash
$ python scripts/tester.py
```
There are multiple optional command line arguments for the testing script. These are described in the table below, along with their default values. Additionally, when running the script from the command line, adding the `-h` option will display a help message with all optional arguments.
| Flag | Description | Default Value |
|:------------------:|:-------------------------------------------------------------------------------------------------------------:|:-----------------------:|
| `-h` `--help` | Display a help message. | ---- |
| `-e` `--endpoint` | The endpoint to connect to lightning with. | `http://localhost:9000` |
| `-m` `--email` | The email to make requests for. | `testy@gmail.com` |
| `-p` `--password` | The password of the user that matches the username. Should not be a hashed password. | `password` |
| `-a` `--auth` | The basic authentication credentials in the form `{app_name}:{app_secret}` | `application:secret` |
| `-v` `--verbose` | Provide more output information. | `False` |
When adding new endpoints to lightning, be sure to include a new `TestCase` for that endpoint in the `tester.py` script.
Another testing option is to use [HTTPie](https://github.com/jkbrzt/httpie). See the [wiki](https://github.com/RohanNagar/lightning/wiki/HTTPie-Testing-Commands) for each individual command.