As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am looking at creating a basic Rails application that can access this API http://instructure.github.io/ I have had a look through the documentation but cannot find anywhere I can get to grips with unfortunately. I am fairly new to Rails but I understand the basics. I was wondering if anyone knows of a good tutorial or resources where I can learn how to build a rails application that calls a third party API and displays the results. I know Canvas Instructure API is via JSON requests. Any information would be very much appreciated.
I would like to note that it uses Oauth2 for API authorisation for requests.
I would take a look at Httparty gem, It should do everything you need to consume an api
Here's an example of using omniauth and Httparty to connect to a 3rd party api
YOu can also take a look at oauth-plugin - https://github.com/pelle/oauth-plugin - which gives you both OAuth Provider and Consumer. Implementing the consumer should give you what you need.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have a Rails web app and I want to provide API. I have found Grape and it looked nice and it can also be mounted into Rails but I am not sure of benefits of mounting Grape into my Rails app and use it for API instead of Rails controllers.
As I understand Grape is great for building applications that provide only API but it is not my case.
What do you think are the benefits of using Grape in the Rails app and why should I do so?
Grape within Rails makes it easy to standardize the syntax of your API.
For example, parameter validation and coercion, error handling specific to your API that's different than what Rails provides out of the box, and easy shortcuts for typical responses.
You could do all this with Rails, of course. Grape just makes it easy.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Please can anyone help me. how to create connect to server for mail sending.
ans is http://iphonesdksnippets.com/post/2009/04/15/Send-email-with-attachments-on-iPhone.aspx
You can do it using: skpsmtpmessage
This is a nice article Sending emails from Cocoa, please check it also.
You need a middle server to receive REST call and process it in any way you want. Any iOs networking interface might be used for this purpose, there's a lot of samples how to create a simple request.
Please give more context of your question. Do you want to achieve it solely by IOS? Or you don't mind to write a bit of server code?
If you are OK to write a bit of server code, you can try Google App Engine API for sending email ( using googgle account ). You have 3 choices of language : Java, Phyton or Go.
Full documentation is located at Google App Engine website.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am just wondering what is the best approach in creating a RESTFUL API in Rails? Should I use Rails-API or Grape gem? What are the benefits/disadvantages of each? Is there a better alternative approach?
The good news is you can create REST APIs in Rails easily without either gem. There's a lot that goes into REST, so I don't think I can completely answer your question here. Fortunately, if you following Rails' conventions, you probably already have a REST API.
It looks like both of those gems are intended for cases where you are not using Rails. Rails-API says "The main example for its usage is in API applications only, where you usually don't need the entire Rails middleware stack nor template generation." Grape is designed for Rack applications, which offer a tiny bit of what Rails has to offer.
I would suggest taking a look at the book "Restful Web Services" by Richardson, Ruby, and Hansson. He does a good job of explaining REST and its advantages. The examples are in Rails, so it'll give you a great start to answering your question. I really enjoyed it and found it helpful in creating REST services in Rails.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am trying to write applications for iPad which take advantage of web services. I know the concept of a web service and have used it in C#/.NET. I need to know how to do this on an iPad. Can anyone recommend a good book or reading material on webservices for iOS?
If you're using iOS frameworks, your solution will involve using NSURLConnection or NSRLRequest. In-depth Apple documentation can be found here. In my experience, you want to wrap those API calls in your own client request that can build data transfer objects your application logic understands.
If you're looking at 3rd party frameworks to access a RESTful web service, take a peek at this answer for a number of iOS framework options.
For SOAP services, take a look here.
As for processing the data, it depends what kind of data your web service produces. There are several frameworks and libraries that can make it easy to consume XML or JSON.
In my experience, the best book on the subject is Advanced iOS Programming.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I am currently in the process of building a mobile app, on iphone. I want the app to be able to connect to a web back-end server to manage user logins and to and retrieve user data. Which would be quicker/simpler to build that type of back-end RoR or Django?
Go with whichever you are most familiar with.
I can't answer about Django, but if you want to write it in Ruby, you should consider using Sinatra as a lightweight alternative to Rails.
If you choose django and are planning on handling RESTful requests from the phone, you should look into django-piston.