Use generator in browser example
This commit is contained in:
parent
cefe9cf31d
commit
964875bfef
|
@ -1,9 +1,9 @@
|
|||
import { Mastodon, Entity, Response } from 'megalodon'
|
||||
import generator, { Entity, Response } from 'megalodon'
|
||||
|
||||
const BASE_URL: string = 'http://mastodon.social'
|
||||
console.log('start')
|
||||
|
||||
const client = new Mastodon(BASE_URL)
|
||||
const client = generator('mastodon', BASE_URL)
|
||||
|
||||
client.getInstance().then((res: Response<Entity.Instance>) => {
|
||||
console.log(res)
|
||||
|
|
Loading…
Reference in a new issue