Hello @kadamwhite
I'm using memberpress(https://www.memberpress.com/) which provides REST api as well. I've installed WP API v2 and on node side i'm using your client.
However, member press API follows this format
wp-json/mp/v1/members/:id
whereas wordpress-rest-client follows this format
wp-json/wp/v2/*
At the moment, there is no way to point memberpress apis from your client, I can use HTTP request then there is authentication.
is it possible for me to call memberpress rest api using this node client?
I think if we can manage to call custom URLs (not via post /page/ taxonomies ) then this is will be really awesome!
After discussion with @rmccue the string mp/v1 taken as a whole is the "namespace"; I have opened issue #141 to track removing the now-obsolete "version" method. Additionally, "base" is a more generic property name for defining a collection endpoint, in the event that a REST endpoint is created for a collection-less resource.
In light of these findings then the .endpoint method would be imagined to work as follows:
@kadamwhite for custom query request, rather than packing them as functions like wp.posts(), we'd rather have it accept custom URL led by namespace and base.
Hello @kadamwhite I'm using memberpress(https://www.memberpress.com/) which provides REST api as well. I've installed WP API v2 and on node side i'm using your client. However, member press API follows this format wp-json/mp/v1/members/:id whereas wordpress-rest-client follows this format wp-json/wp/v2/* At the moment, there is no way to point memberpress apis from your client, I can use HTTP request then there is authentication. is it possible for me to call memberpress rest api using this node client?
I think if we can manage to call custom URLs (not via post /page/ taxonomies ) then this is will be really awesome!
thanks, Andrei
@andreipot As discussed in #138, there's currently not good support for this. The interface I have been hoping to implement would look like this:
I'd be curious for your thoughts about this interface.
After discussion with @rmccue the string
mp/v1taken as a whole is the "namespace"; I have opened issue #141 to track removing the now-obsolete "version" method. Additionally, "base" is a more generic property name for defining a collection endpoint, in the event that a REST endpoint is created for a collection-less resource.In light of these findings then the
.endpointmethod would be imagined to work as follows:@kadamwhite Awesome, I will test it and let you know. I think what you did is right.
@kadamwhite for custom query request, rather than packing them as functions like wp.posts(), we'd rather have it accept custom URL led by namespace and base.
@andreipot can you elaborate or provide an example to show what you mean?