<nakilon>
made a workaround with --units-exponent 0
mikrosis has joined #ruby
taupiqueur has quit [Remote host closed the connection]
taupiqueur has joined #ruby
<adam12>
nakilon: LOL
<adam12>
-r--r--r-- 1 nobody users 4631 Nov 8 2008 graph.rb
<adam12>
That's the last time I directly interacted with RRD
<adam12>
That project predates bundler, IIRC.
taupiqueur has quit [Remote host closed the connection]
taupiqueur has joined #ruby
bit4bit_ has joined #ruby
<nakilon>
in 2008 I only decided to start learning Ruby lol
bit4bit has quit [Read error: Connection reset by peer]
taupiqueur has quit [Remote host closed the connection]
taupiqueur has joined #ruby
tbaeder has quit [Ping timeout: 252 seconds]
Oxfuxxx has joined #ruby
darkxploit has joined #ruby
Oxfuxxx has quit [Ping timeout: 252 seconds]
Oxfuxxx has joined #ruby
shoto has joined #ruby
shoto has quit [Remote host closed the connection]
shoto has joined #ruby
shoto has quit [Client Quit]
mikrosis has quit [Ping timeout: 252 seconds]
Oxfuxxx has quit [Ping timeout: 252 seconds]
taupiqueur has quit [Ping timeout: 252 seconds]
Oxfuxxx has joined #ruby
jpw has joined #ruby
Oxfuxxx has quit [Ping timeout: 252 seconds]
Oxfuxxx has joined #ruby
taupiqueur has joined #ruby
MeowcatWoofWoofF has quit [Ping timeout: 246 seconds]
_ht has joined #ruby
MeowcatWoofWoofF has joined #ruby
Oxfuxxx has quit [Ping timeout: 260 seconds]
MeowcatWoofWoofF has quit [Ping timeout: 264 seconds]
MeowcatWoofWoofF has joined #ruby
Bounga has quit [Ping timeout: 252 seconds]
Bi[m] has quit [Ping timeout: 246 seconds]
CrazyEddy has joined #ruby
Oxfuxxx has joined #ruby
SuperLag has quit [Ping timeout: 246 seconds]
SuperLag has joined #ruby
Oxfuxxx has quit [Quit: leaving]
Oxfuxxx has joined #ruby
BSaboia has joined #ruby
guest23 has joined #ruby
<guest23>
I am trying make a Rails app using the REST API of Shopify. What is the common way to set up REST methods? Do I need to use a library or Gem? And are the methods setup through controllers? Rails noob here. Thanks.
Bi[m] has joined #ruby
crankharder has joined #ruby
<adam12>
Guest23: This is so Shopify can communicate with your app?
<guest23>
Yes. My app will be a client.
<adam12>
Guest23: Can you give me an example of what the first thing you're looking at doing? is there Shopify docs you're looking at?
<weaksauce>
Guest23 there's a shopify gem you can use
<guest23>
I want to send a POST through their REST API. Yes I've looked at their docs. Just wondering how to put the code into a rails app to do this.
<adam12>
Guest23: If you follow a Rails tutorial or the Rails guides, they will show you REST routes. But in a nutshell: if you have a collection of Books, and you want to manage those books, you'd have REST routes for those books. GET /books => BooksController#index, POST /books => BooksController#create, etc.
<adam12>
Oh. Ok. So you're the client but for SENDING to them, not RECEIVING their webhook. I'd use the shopify gem as weaksauce mentioned.
<guest23>
Thanks. Yes I have the gem. But their REST documentation doesn't tell me how to put it into Ruby. I was able to successfully make a curl request but just trying to find where to start with that. Someone mentioned using the faraday library. Is that right?
<weaksauce>
and is there a specific reason you want to use rest over graphql
<guest23>
Yes I did see that. That is really the only documentation they have for some Ruby commands. But that is for a new product. I am looking to create and manipulate Pages. Just a little confused why they don't have Ruby in the full docs but have curl, php, and node.
tkonto has joined #ruby
<tkonto>
JSON.parse(response.body)["id"]
<tkonto>
does this mean "from the JSON output get the 'id'"?
<guest23>
I'm a beginner and REST to me is a lot simpler and I think it's beneficial since so many other services are using REST and not GraphQL.
<newton>
tkonto, yeah if response.body is "{\"id\": 1}" it would turn into { "id" => 1 } and ['id'] would return 1
<tkonto>
thank you
<tkonto>
do you happen to know how to do the same in ansible? :)
<newton>
Guest23, I don't think that's a bad take since you're learning but shopify prefers graphql overwhelmingly and isn't a bad thing to learn either
<newton>
tkonto, I've never used ansible unfortunately
<tkonto>
NP but thank you for the enlightenment.
<weaksauce>
yeah i'd suggest learning the graphql way since that's their main squeeze
<guest23>
True. Now say I still want to use REST. Is it just more experienced simply know how to format the requests without docs? And requests are supposed to go into controllers right?
<weaksauce>
it's up to you really
stevea has quit [Quit: Either I or my computer has gone to sleep. ZZZzzz…]
<weaksauce>
i don't think rest vs. graphql changes anything that fundamental about how you go about architecting your website
<guest23>
Yea. I'll give it shot. Just REST seemed more like a more universal thing then some tech originally by FB. But if they are gonna make it so hard with REST then so be it lol. Thanks again.
<weaksauce>
well i meant that you can architect your app to be somewhat agnostic to the interface it's calling
<guest23>
I gotcha
<newton>
Guest23, fwiw graphql is getting a lot of popularity so it originated with fb but is used by a lot of people
<newton>
I find it specifically very nice to work with when doing frontend apps