We have two sample apps in the examples
directory, check them out!
Run WikipediaGETRequest.js
. Make sure to install Axios first!
First, make sure you have a valid Phone2Action API Key. If you don't have one, text HACKTJ19
to 52886
on your phone to receive yours. Then, in line 8 of Phone2ActionGETRequest.js
. change the value to your Phone2Action API Key.
So, if your Phone2Action API Key is abcdefg
, line 8 in Phone2ActionGETRequest.js
should look something like this:
Axios.defaults.headers.common['X-API-Key'] = 'abcdefg'
Make sure you've installed Axios!
Run Phone2ActionGETRequest.js
; you should see information about the Representative in national Congress for TJHSST's district print to your console.
Axios is an external dependency which we use to make our HTTP requests. You can install it with NPM (npm install axios
) or, preferably, Yarn (yarn add axios
). If Axios isn't running properly on your system, these programs won't run.