Skip to content

Commit

Permalink
Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
WCByrne committed Apr 4, 2018
1 parent 86e86b5 commit cf68714
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Open up spark.json in a text editor, preferrably one that has json support.
## The Config File

The config file defines the requests that should be made when running spark. The top level keys are global to all requests, or "cases". Each case then provides options per request.
>

> <a name="service"></a>
> **service** `String`
>
Expand All @@ -62,11 +62,10 @@ The config file defines the requests that should be made when running spark. The

<a name="cases"></a>
## Cases
### Cases

Each case uses the properties defined by the top level properties defined in your config file. Some properties may be futher customized per case.


> **name** `String`
>
> The name of the file to save the response to.
Expand Down Expand Up @@ -96,9 +95,8 @@ Each case uses the properties defined by the top level properties defined in you
>
> The name of a oauth token defined in oauth.tokens. See **[OAuth](#oauth)** for more.

<a name="oauth"></a>
## OAuth
### OAuth

The oauth option defines the credentials for each case cases in the config file.

Expand All @@ -116,8 +114,9 @@ The oauth option defines the credentials for each case cases in the config file.
>
> Rather than duplicate these per request tokens in each case they are defined globally and referrened by name in each case (see **[case token](#case-token)**).
>
>
> <details>
> <summary>Example</summary>
> <summary>Tokens Options</summary>
>
> ```json
> {
Expand Down Expand Up @@ -183,6 +182,20 @@ If your config file contains oauth tokens be careful of publishing them with you
}
```
## Running Spark
With your config file setup all that's left to do is run spark.
```
spark [-c path] [-o path]
```
* `-c path`: optional path to config file. Defaults to ./spark.json
* `-o path`: a directory to save respones in. Can be ommitted if defined in the config file
In other words, with the output path in your config file it's as simple as running `spark` from within the directory containing your `spark.json` config file. 🎉
## Credits
OAuth signing thanks to **[OhhAuth](https://github.com/mw99/OhhAuth)**

0 comments on commit cf68714

Please sign in to comment.