-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from h3poteto/fix/ua
refs #48 Remove User Agent in REST API call because it is guarded
- Loading branch information
Showing
4 changed files
with
48 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
const Mastodon = require( '../../lib/mastodon') | ||
const Mastodon = require('../../lib/mastodon') | ||
|
||
const BASE_URL = 'https://mastodon.social' | ||
const BASE_URL = 'https://mstdn.jp' | ||
|
||
const access_token = '...' | ||
const access_token = process.env.MASTODON_ACCESS_TOKEN | ||
|
||
const client = new Mastodon( | ||
access_token, | ||
BASE_URL + '/api/v1' | ||
) | ||
const client = new Mastodon(access_token, BASE_URL + '/api/v1') | ||
|
||
client.get('/timelines/home') | ||
.then(res => console.log(res.data)) | ||
client.get('/timelines/home').then(res => console.log(res.data)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,11 @@ | |
resolved "https://registry.yarnpkg.com/@types/core-js/-/core-js-2.5.0.tgz#35cc282488de6f10af1d92902899a3b8ca3fbc47" | ||
integrity sha512-qjkHL3wF0JMHMqgm/kmL8Pf8rIiqvueEiZ0g6NVTcBX1WN46GWDr+V5z+gsHUeL0n8TfAmXnYmF7ajsxmBp4PQ== | ||
|
||
"@types/eslint-visitor-keys@^1.0.0": | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" | ||
integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== | ||
|
||
"@types/events@*": | ||
version "1.2.0" | ||
resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" | ||
|
@@ -88,6 +93,14 @@ | |
requireindex "^1.2.0" | ||
tsutils "^3.7.0" | ||
|
||
"@typescript-eslint/[email protected]": | ||
version "1.10.2" | ||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.10.2.tgz#cd548c03fc1a2b3ba5c136d1599001a1ede24215" | ||
integrity sha512-Hf5lYcrnTH5Oc67SRrQUA7KuHErMvCf5RlZsyxXPIT6AXa8fKTyfFO6vaEnUmlz48RpbxO4f0fY3QtWkuHZNjg== | ||
dependencies: | ||
"@typescript-eslint/typescript-estree" "1.10.2" | ||
eslint-scope "^4.0.0" | ||
|
||
"@typescript-eslint/[email protected]": | ||
version "1.9.0" | ||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.0.tgz#a92777d0c92d7bc8627abd7cdb06cdbcaf2b39e8" | ||
|
@@ -105,6 +118,24 @@ | |
eslint-scope "^4.0.0" | ||
eslint-visitor-keys "^1.0.0" | ||
|
||
"@typescript-eslint/parser@^1.10.2": | ||
version "1.10.2" | ||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.10.2.tgz#36cfe8c6bf1b6c1dd81da56f88c8588f4b1a852b" | ||
integrity sha512-xWDWPfZfV0ENU17ermIUVEVSseBBJxKfqBcRCMZ8nAjJbfA5R7NWMZmFFHYnars5MjK4fPjhu4gwQv526oZIPQ== | ||
dependencies: | ||
"@types/eslint-visitor-keys" "^1.0.0" | ||
"@typescript-eslint/experimental-utils" "1.10.2" | ||
"@typescript-eslint/typescript-estree" "1.10.2" | ||
eslint-visitor-keys "^1.0.0" | ||
|
||
"@typescript-eslint/[email protected]": | ||
version "1.10.2" | ||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.10.2.tgz#8403585dd74b6cfb6f78aa98b6958de158b5897b" | ||
integrity sha512-Kutjz0i69qraOsWeI8ETqYJ07tRLvD9URmdrMoF10bG8y8ucLmPtSxROvVejWvlJUGl2et/plnMiKRDW+rhEhw== | ||
dependencies: | ||
lodash.unescape "4.0.1" | ||
semver "5.5.0" | ||
|
||
"@typescript-eslint/[email protected]": | ||
version "1.9.0" | ||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz#5d6d49be936e96fb0f859673480f89b070a5dd9b" | ||
|
@@ -222,10 +253,10 @@ aws4@^1.8.0: | |
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" | ||
integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== | ||
|
||
axios@^0.18.1: | ||
version "0.18.1" | ||
resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3" | ||
integrity sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g== | ||
axios@^0.19.0: | ||
version "0.19.0" | ||
resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.0.tgz#8e09bff3d9122e133f7b8101c8fbdd00ed3d2ab8" | ||
integrity sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ== | ||
dependencies: | ||
follow-redirects "1.5.10" | ||
is-buffer "^2.0.2" | ||
|