Paul Woolcock
6c978f090f
Add `force_login` to the params sent to the /oauth/authorize endpoint
6 years ago
Paul Woolcock
dd72034849
use string for status id in StatusBuilder
6 years ago
Paul Woolcock
15cc5c60de
Make `Registered::complete` take self by reference
6 years ago
Paul Woolcock
f12c0a4acb
Add `Registered::into_parts`
6 years ago
Paul Woolcock
32e40edd6c
Add `Registered::from_parts`
...
this allows one to store the information for a specific instance so the
register call is not always necessary
6 years ago
Paul Woolcock
2d8958e0d9
Update code to be compatible with reqwest 0.9
6 years ago
Paul Woolcock
d6a9911a0b
Eliminate another place using .form instead of .json
6 years ago
Paul Woolcock
8db3d18219
Make sure scopes are percent-encoded when making the URL
6 years ago
Paul Woolcock
e284894d40
feat(scopes): Implement granular OAuth scopes
...
BREAKING CHANGE: Applications that use the `Scopes` data structure will
have minor changes to make
Closes #44
6 years ago
Paul Woolcock
af806b7856
move Scopes to their own module
6 years ago
Paul Woolcock
57cc44368c
Document "everything"
...
This is a good start but many things need to be documented better, but
this will at least allow us to turn on #[deny(missing_docs)]
6 years ago
Paul Woolcock
b4a43dc783
Add some more tests
6 years ago
Paul Woolcock
5b24922d9e
Add some more lints, and fix the compile errors they generate
6 years ago
Paul Woolcock
4e5a2f5c51
Update to v0.13.0
6 years ago
Paul Woolcock
0df3f9fa2b
Rework the `Registration` and `App` APIs
...
This puts `register` back to the way it was, and changes the "new"
`register` to `build`.
6 years ago
Paul Woolcock
e7005b0b6b
Users shouldn't have to parameterize their code unless they need to for tests
6 years ago
Paul Woolcock
1057e58343
There's no reason for Registration::complete to take an owned string
6 years ago
Paul Woolcock
aaa0edc98f
Add a test for the default_redirect_uri
6 years ago
Paul Woolcock
a407249fa5
Remove `elefren::apps::prelude`
...
Since we don't need `App` in a prelude anymore, just move `Registration`
and `Scopes` to the main prelude and get rid of `elefren::apps::prelude`
6 years ago
Paul Woolcock
c5788b8bd5
rustfmt pass
6 years ago
Paul Woolcock
1436c28e42
duplicate the AppBuilder api in Registration
...
Closes #13
6 years ago
Paul Woolcock
3330a26760
rustfmt pass
6 years ago
Paul Woolcock
49a2237803
Introduce HttpSend trait for converting `Request` -> `Response`
...
Parameterize everything that involves sending HTTP requests with the `H:
HttpSend` bound. This will allow us to swap out `HttpSend`
implementations when necessary, in order to better test our code
6 years ago
Paul Woolcock
8636e690c3
rustfmt pass
6 years ago
Paul Woolcock
0f5e295ea9
Revamp registration & auth process
6 years ago
Paul Woolcock
e5175f09fe
make apps::prelude and use the preludes in the tests
6 years ago
Paul Woolcock
7f1303b5f6
Set a default redirect_uri if none is provided
6 years ago
Paul Woolcock
a9b6b52890
Change mammut references to elefren
6 years ago
Paul Woolcock
22b4b04738
Adds a `MastodonClient` trait
...
This is useful for user code, which can use the trait to add a layer of
indirection to their code, allowing them to swap out implementations for
testing
6 years ago
Aaron Power
523d83022e
Fixed example code, and {un}follow routes.
6 years ago
Aaron Power
75eea88023
Fixed examples
7 years ago
TheBestJohn
ab1e5f86f0
Fixed the registration of new apps as well as url of statuses is now an Option<String> ( #23 )
...
* Changes IDs to Strings for compliance with APIv1
* - Changed Scope to Scopes to coencide with a quirk of the Mastodon API. Initial registration of the app asks for "Scopes" and authorization asks for "Scope"
- Swapped spaces for urlencoded spaces in the scopes serde definition to prevent broken links
- url of status is returned as a Map not a string"
* Fixed tests and updated Version number
* Fixed tests and verified now... learning experience
7 years ago
Aaron Power
b445197381
docs(all): Added documentation to missing parts
7 years ago
Aaron Power
b6d350f29e
updated reqwest and fixed media route
...
reqwest updated to 0.8
removed Result for creating Mastodon client as result of reqwest update
added Meta and ImageDetails struct for Attachment
Changed Attachment.id to String
Added test for media route.
Changed paramaters for media from Vec<u8> of image data to String of
file path.
Added dotenv for testing
7 years ago
Aaron Power
39e539646b
Version 0.6
...
Added proper error handling
impl fmt::Display for apps::Scope
make StatusBuilder.status public
8 years ago
Aaron Power
a528624dc3
0.3.0 Redone registration api, added debug/clone
8 years ago