vanita5 / mastodon-api Goto Github PK
View Code? Open in Web Editor NEWMastodon API Client Library
License: MIT License
Mastodon API Client Library
License: MIT License
Hi,
we're using mastodon-api at https://github.com/yogthos/mastodon-bot and https://github.com/DomainDrivenArchitecture/dda-masto-embed. At the moment we're trying to get rid of the warning
npm install says:
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
I think mastodon-api is affected by deprecated request also. A solution (found e.g. at https://github.com/HunterLarco/twitter-v2) might be to replace
What do you think?
Hello there,
Thank you for this API. I'm using Yogthos' mastodon-bot in a very tigh and controled environment.
The bot has been working very well but has recently begun to make call to an undesired IP address. After some research, this seems to be occuring when using mastodon-api . I'm requesting this profile https://mastodon.xyz/web/accounts/257584 and it results in (among other things) a call to this IP address which is in no way linked or appear on this profile: 163.172.251.107
I unfortunately don't have time to investigate why this is happening so if anyone had an idea I'll be happy to hear it as it quite problematic within my tighly controled environment.
Some Mastodon API requires PATCH request to use API. But I can't find any method to make PATCH request.
Example of API requires PATCH request:
As mentioned in Mastodon’s documentation some API endpoints do not require an authentication. (e.g. statuses/:id
)
https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md#timelines
If I try to create a Mastodon object without a an access_token I get the following error:
./node_modules/mastodon-api/lib/mastodon.js:345
throw new Error('Mastodon config must include \'' + reqKey + '\' when using \'user_auth\'');
^
Error: Mastodon config must include 'access_token' when using 'user_auth'
Is it possible to make unauthorized API calls?
I'm trying to use GET /api/v1/streaming/user
but Failed to use streaming/user using js
that should have Return events that are relevant to the authorized user, i.e. home timeline and notifications to me
but gave me this error after 5 seconds of hold
https://github.com/dru18/druBot/blob/master/issue/screenshot/error_streaming_user.png
i'm using this code to get steaming/user
https://github.com/dru18/druBot/blob/master/issue/druStream.js
i'm using
OS: Mint 18.3 sylvia
The current parsing algorithm means that if a couple of heartbeats are received, and then a update
event is received, the value of chunk
will be something like
:thump
:thump
event: update
data: {...}
But then, the check for the heartbeat is applied to the whole chunk of data, and for the case described just above, the behaviour is to ignore the whole payload.
Hello, Thank you for nice library.
I met TransformError on React Native.
Environment:
Mac OSX 10.12.4
node v7.7.1
React Native 0.43
https://facebook.github.io/react-native/docs/getting-started.html
import Mastodon from 'mastodon-api'
I tried to use Babel Latest preset and set "latest" to .babelrc.
but Error Message not changed.
https://babeljs.io/docs/plugins/preset-latest/
Please tell me any solution?
Thanks!
I was debugging why I was being notified of deleted statuses whose IDs I didn't recognize. For example, I received the following payload from the mastodon-api message
listener:
{ event: 'delete', data: 110988663231921360 }
Note that this is a number (even though Mastodon streaming API docs claim it should be a string ID). However, if in parser.js
I console.log the raw message, here's what it receives:
event: delete\ndata: 110988663231921363\n\n
110988663231921363 (≈2**56.623
) is bigger than MAX_SAFE_INTEGER so it gets rounded to the value coming out of the message
listener:
> parseInt('110988663231921363')
110988663231921360
Note how the two numbers above aren't the same.
Do you have any tips on how the parser should be modified to handle this special case? Should we have a list of events that need to be treated as strings (like delete
) and pass that through as-is without any JSON decoding?
When I run npm install, I get the following warning:
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.