Is there a complete Frida Javascript API documentation? - frida

I recently came across the Frida tool. And it feels amazing. But I can't find a good documentation on its Javascript API. For example, where can I read about how to use Java.use('...').methodName.overload('...') correctly? Besides existing examples. I couldn't find it on their website https://frida.re/

Related

how to organize outgoing api request urls in rails

I have an application in rails that make request to other microservices using httparty. Other microservices are also written in Rails. Right now, i hard coded all the api urls used in httparty, what will be a more elegant way to organize them?
This is a great question, although it's way too broad to be answered meaningfully here without more specifics on the problem you're solving.
However, if I were you, I'd start by reading the source code for existing API libraries. It's a fantastic way to learn about API design principles from very practical examples in products you likely use every day.
Personally, I've found that the Stripe Ruby SDK (https://github.com/stripe/stripe-ruby specifically, lib/stripe/api_operations), the Slack Ruby SDK (https://github.com/dblock/slack-ruby-client), AWS Ruby SDK (https://github.com/aws/aws-sdk-ruby though this one's pretty big), and Github Ruby SDK (https://github.com/aws/aws-sdk-ruby) are all well designed and worth studying.

RESTful API and rails

Not entirely sure if this is a beginner question, but I can't seem to find any detail information regarding how to use APIs with rails.
For the past months I've been to a few hackathons / interviews where one of the tasks is to use APIs to return some meaingful data and make something cool. I looked online for documentations on how to integrate API to websites using rails, but can't seem to find any good ones.
How exactly do I integrate APIs with rails and where should I put them? Some examples of APIs that I would like to play around with are Zappos and Parse, both are REST APIs
https://parse.com/docs/rest
http://developer.zappos.com/docs/api-documentation/
If there are some links that you would like to share, that would be awesome!!
Anything that lets you send http requests to a remote URL can be used to implement your own wrapper for a restful API, but I personally prefer to use the rest-client gem:
https://github.com/rest-client/rest-client
If you wanted to take a more hands on approach, you can just go straight for the Net:HTTP library in Ruby:
http://ruby-doc.org/stdlib-2.1.3/libdoc/net/http/rdoc/Net/HTTP.html

REST API document generation

Is there a library that provides a markup for writing REST API documentation? I have seen several companies use similar documentation pattern, e.g:
http://api.teamlab.com/2.0/
http://www.fullcontact.com/docs/?category=person
I am wondering if they are using the same library or service. Essentially, the library should generate pages for API navigation, search and display ( much like YARD for ruby documentation) based on the markup text.
This is what I have found so far:
rapi_doc gem. Here is an article discussing the usage.
You should definitely have a look at Swagger.
It is Open Source, used by hundreds of APIs and also used by 3scale in its API Management solution under the name Active Docs.
Check out IO/Docs from Mashery.
Mashery I/O Docs, the next generation of API documentation and exploration, let developers execute live API calls directly from your docs. Think docs meet testing and debugging, all in one convenient, interactive interface.
Check out the Parse API Docs for another example of great docs.
Also, we spent a lot of time designing the FullContact API Docs. We make use of the Apigee Live API Console as well.
This is a useful gem for api documentaion (Rails4 and Rails5)
ApiDoco https://rubygems.org/gems/apidoco/versions/1.2.0.
It is very easy to setup and have a good user experience.

Titanium oAuth Request

I have a Titanium Appcelerator project and I am trying to incorporate an API that uses oAuth. I found an excellent implementation of oAuth in Titanium Appcelerator for SimpleGeo by Aaron Saunders over at his blog:
http://blog.clearlyinnovative.com/post/3321606289/titanium-appcelerator-quickie-oauth-and-simplegeo
It is extremely simplified and boiled down so I figured it would be easy to transfer the implementation to other APIs. In my case, I would like to extend it to Quizlet's API found here:
https://quizlet.com/api/2.0/docs/authorization_code_flow/
However, I am afraid I am just too new to oAuth in general that I don't even know where to begin, especially in how and what to do to the parameters. I'm hoping it's as simple as changing some parameters around.
It would be terrific if an expert could spare some time and maybe explain how I would go about adapting the implementation for Quizlet's API.
Thank you so much in advance. Please let me know if you would like me to paste in the code from Aaron's blog or do anything. I didn't want to clutter this post.

Getting started consuming web services in a Ruby on Rails 3 application

So I'm getting started learning Rails. Now that Rails 3 is out, I want to stick to learning the Rails 3 way of doing things. One of the things I want to learn how to do is how to consume web services / work with third party REST APIs / create "mashup" applications. I've only done minimal work like this with PHP and pre-built libraries.
Can someone please lead me to some resources, best practices, or give me a quick 101 lesson on how to start working with these types of APIs? What gems should I use? Some sample code to get me started would be much appreciated.
Update: I am specifically trying to use the Google Books API (non-authenticated). Since there is no client library for this API, I'm wondering how other Ruby/Rails developers are working with APIs that don't come with their own Ruby library. That's why I'm looking for a more generic solution to working with "fill in the blank" API.
Update: After some research, I noticed the Net::HTTP library. All the tutorials that talked about it were fairly old. Is this still the best library to use for consuming RESTful web services? Or is there a newer Gem that makes this easier? I just want to know which gem/library I should use, and how to work with the XML/JSON result that is returned.
Update: This presentation was really helpful. It mentions a bunch of different libraries and shows examples of some of the libraries mentioned below: http://www.slideshare.net/pengwynn/json-and-the-apinauts
I'm a pretty big fan of HTTParty.
It's an abstraction layer on top of Net::HTTP with a nice little DSL for consuming web services. Here's a good example of how easy it is to use.
It's not without some warts (lots of dependencies) but it's really the way to go if you're on the consuming side.
I'd recommend REST with Nokogiri:
http://railscasts.com/episodes/190-screen-scraping-with-nokogiri
Nokogiri works well with xml too, not just HTML.
Weary is a really neat DSL for consuming RESTful services.
Clearly inspired by HTTParty but a bit newer and a bit more concise.

Resources