Coder Social home page Coder Social logo

Comments (6)

benedikt avatar benedikt commented on July 30, 2024 1

@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.

benedikt avatar benedikt commented on July 30, 2024 1

The Platform API was renamed to Server API. Sorry, I keep forgetting that :)

from layer-ruby.

benedikt avatar benedikt commented on July 30, 2024

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.

PelagicDev avatar PelagicDev commented on July 30, 2024

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.

PelagicDev avatar PelagicDev commented on July 30, 2024

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.

PelagicDev avatar PelagicDev commented on July 30, 2024

Oh okay, that makes more sense. Thanks again for your quick responses!

from layer-ruby.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.