-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
88 additions
and
81 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
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,16 +1,12 @@ | ||
const Mastodon = require( '../../lib/mastodon') | ||
const Mastodon = require('../../lib/src/mastodon') | ||
|
||
const BASE_URL = 'https://mstdn.jp' | ||
const BASE_URL = 'https://mastodon.social' | ||
|
||
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('/favourites') | ||
.then((res) => { | ||
console.log(res.headers) | ||
console.log(res.data) | ||
}) | ||
client.get('/favourites').then(res => { | ||
console.log(res.headers) | ||
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
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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
import Mastodon, { Status, Response } from 'megalodon' | ||
|
||
const BASE_URL: string = 'https://mstdn.jp' | ||
declare var process: { | ||
env: { | ||
MASTODON_ACCESS_TOKEN: string | ||
} | ||
} | ||
|
||
const access_token: string = '...' | ||
const BASE_URL: string = 'https://mastodon.social' | ||
|
||
const client = new Mastodon( | ||
access_token, | ||
BASE_URL + '/api/v1' | ||
) | ||
const access_token: string = process.env.MASTODON_ACCESS_TOKEN | ||
|
||
client.get<[Status]>('/favourites') | ||
.then((res: Response<[Status]>) => { | ||
console.log(res.headers) | ||
console.log(res.data) | ||
}) | ||
const client = new Mastodon(access_token, BASE_URL + '/api/v1') | ||
|
||
client.get<[Status]>('/favourites').then((res: Response<[Status]>) => { | ||
console.log(res.headers) | ||
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
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
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