Comments (6)
@jegodwin Yes, you can use the REST Client to access the Client API directly. The instances of the client support methods like .get
and .post
to do HTTP requests.
You can also use the Platform Client an do requests to the client proxy endpoints on the Platform API.
from layer-ruby.
The Platform API was renamed to Server API. Sorry, I keep forgetting that :)
from layer-ruby.
Hi @jegodwin!
You can do arbitrary request by using the client directly. Check out the relevant section in the readme:
https://github.com/benedikt/layer-ruby#using-the-gem-with-multiple-applications-at-once
Using the client instance you can do HTTP requests to the API and will get back Ruby hashes. Hope this helps. :)
Cheers,
Benedikt
from layer-ruby.
Okay, got it. I overlooked this part of the Readme somehow, but I think the part I'm looking for is the Client REST stuff.
More specifically, I'm wanting to create a follow
for the current_user
to target user. So, would I just auth a new client instance and then use something like ruby's net/http
to then make REST call's using the new client session I've just created?
Thanks for the quick reply @benedikt as well as your work on this library!
from layer-ruby.
Ah, okay, I see now. Thanks for clarifying that.
I seem to remember there being docs for the Platform Client
on Layer's website at some point. Do you know if they've deprecated the Platform Client API?
from layer-ruby.
Oh okay, that makes more sense. Thanks again for your quick responses!
from layer-ruby.
Related Issues (17)
- support for new format for Application's IDs HOT 1
- 422 Unprocessable Entity HOT 2
- Get messages in conversation HOT 7
- undefined method `participants=' for #<Layer::Conversation:0x00000007e31d20> HOT 2
- NoMethodError: private method `include' called for #<Class:#<Layer::RelationProxy:0x007fd1f67016e0>> HOT 2
- sending custom payload returns 422 error HOT 9
- new uninitialised constant error in latest code HOT 2
- 404 Resource Not Found for every request HOT 11
- How to get messages in a conversation HOT 3
- Error on conversation creation/save HOT 1
- Store status when creating distinct conversation HOT 1
- set custom If-None-Match header HOT 3
- InvalidHeader on Layer::Client.authenticate HOT 3
- Identity metadata HOT 7
- 2.0 API HOT 3
- Could not find conversation error recently started (last 2 days)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from layer-ruby.