New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert all code to use the ralith branch of ruma-api. #17

Closed
wants to merge 14 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@jimmycuadra
Member

jimmycuadra commented Feb 10, 2017

This is a work in progress to use the version of ruma-api proposed in ruma/ruma-api#9, so we can see how well it actually works. I want to try integrating this branch of ruma-client-api into both ruma-client and ruma, too, as that is the real test of how well it fits. Feedback welcome!

/cc @Ralith @vberger @eternaleye @jplatte @exul @neosam

fn description() -> &'static str {
"Get the versions of the client-server API supported by this homeserver."
fn try_from(_request: ::Request) -> Result<Self, Self::Err> {
Ok(Request)

This comment has been minimized.

@vberger

vberger Feb 10, 2017

Contributor

Question: Should this return an error if superfluous parameters are given?

This comment has been minimized.

@jimmycuadra

jimmycuadra Feb 10, 2017

Member

I'd say not.

@vberger

This comment has been minimized.

Contributor

vberger commented Feb 10, 2017

I like the way it looks overall 👍

I still think that a good part of the endpoint definition could be factored with a macro, I'll think about that when I get some time.

jimmycuadra added some commits Feb 11, 2017

WIP
@jimmycuadra

This comment has been minimized.

Member

jimmycuadra commented Feb 11, 2017

I converted the account module, which provides a more substantial example than unversioned. I'm curious what everyone thinks.

@jimmycuadra

This comment has been minimized.

Member

jimmycuadra commented Feb 11, 2017

Converted the alias module too. At this point I'm gonna experiment with a macro to reduce boilerplate, as the implementation patterns are becoming clearer.

@neosam

This comment has been minimized.

Contributor

neosam commented Feb 18, 2017

The contact module looks a lot cleaner with the macros. For me it feels a lot easier to get started with the new code.

@jimmycuadra

This comment has been minimized.

Member

jimmycuadra commented May 12, 2017

Closing in favor of the new ruma-api API. Manually implemented the unversioned module on the "manual" branch, but my plan is to have all of these endpoints generated through a Macros 2.0 procedural macro, which will likely be an evolution of ruma-api-derive.

@jimmycuadra jimmycuadra deleted the ralith branch May 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment