paulsingh / angellist-api Goto Github PK
View Code? Open in Web Editor NEWRuby wrapper for the Angellist API
Home Page: http://angel.co/api
License: MIT License
Ruby wrapper for the Angellist API
Home Page: http://angel.co/api
License: MIT License
I'm seeing a MultiJson exception when authorization failed instead of it being caught and our Unauthorized
error being thrown -- this could be something not caught by tests from the recent loosening of multi_json
and faraday
version dependencies, or AngelList changed response/headers, or it could have just been broken for awhile and we didn't notice π
Internally, see http://500.airbrake.io/errors/51824415
Since the setup is in place for authenticated tests now, fill in the holes in the specs. RSpec metadata can be used for endpoints where authentication is optional to specify behavior of both paths:
context 'when authenticated', :authenticated do
# ...
end
There's a lot that I'd like to do for a 2.0 of this gem dealing with making it more focused on domain models in an object-oriented way, instead of just a glorified JSON-to-Hashie::Mash
deserializer (like the similar direction that the Twitter gem that was our genesis has taken). So I'm just creating this issue to acknowledge that some thought has been given to it.
Leading up to a major rewrite though, there's plenty of internal ugly hackery that could stand a good hosing-off too. Someone asked me questions about the code recently and I was appalled by some things I never paid much attention to π (legacy code we inherited from the old, misguided Twitter gem I think). The worst offense I noticed was that the top-level module extends itself with the Configuration module, and then proceeds to define a liberal method_missing
. The result is that Configuration
attribute accessors like connection_options
are in scope throughout most of the library. Gross, and probably a thread safety nightmare as this is singleton state.
Consider using HTTPI, Faraday's future is in question and we've had dependency hell from it in the pastβit bugs me how many libraries in the Ruby ecosystem chain applications to dependence on a range of different HTTP clients outside the standard lib (ahem, oauth2
).
Oops, sorry. Created this issue by mistake, but can't delete it.
Beginning July 6th, AngelList will require all API calls to be authenticated. Ideally we should prevent calls from being made when a client instance has not been configured with authentication credentials, warning or raising an error before sending a request that is doomed to fail.
I get these two errors when I run the bundle exec rake spec
command :
Failure/Error: results = client.search('joshua', :type => 'User')
VCR::Errors::UnhandledHTTPRequestError
Failure/Error: roles = client.get_startup_roles(params)
VCR::Errors::UnhandledHTTPRequestError
And same with the new feature I just added. Is it my config or something else ?
We have :ssl => {:verify => false}
in the Faraday connection options. This was likely cargo-culted. It needs to die a fiery death. But, we should make it configurable, for crazy people stuck in some situation with broken SSL and unable to fix it.
This is more of a question rather than an issue. How does pagination work?
For example using get_tag_children might return more than one page, yet the method doesn't allow for a page option to be set. How can I get the second page and so forth?
For instance, you need the message scope to use the messages API resources.
From Josh on the API team, the response will be an HTTP 400 with JSON body including obj['error']['type'] == 'insufficient_scope'
.
Hi,
i have versions conflict to use angellist-api in my app. Could you please make some tuning for dependencies in your gem?
$ bundle
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Bundler could not find compatible versions for gem "faraday":
In Gemfile:
angellist_api (>= 0) ruby depends on
faraday (~> 0.7.4) ruby
foursquare2 (>= 0) ruby depends on
faraday (0.8.1)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
angellist_api (>= 0) ruby depends on
rails (~> 3.1.0.rc6) ruby
rails-footnotes (>= 3.7.5.rc4) ruby depends on
rails (3.2.7)
So I'm not quite sure what's going wrong here but I've identified at least one startup that breaks the API. I'm not sure if it's on the client side or if it's an API error. However this is the startup:
http://api.angel.co/1/startups/173424
I'm looking into it but the only thing that stood out to me initially was that the video_url is null. Any ideas? Have you run into similar issues? There's another startup causing the issue as well. Startup ID: 185802. That one has the crunchbase_url set to null as well.
Do you think that's the issue?
This is more of a question rather than an issue. How does pagination work?
For example using get_tag_children might return more than one page, yet the method doesn't allow for a page option to be set. How can I get the second page and so forth?
Currently undocumented, helpful for debugging batch roles operations.
It should be possible to, for instance, insert caching middleware in the stack.
Use a YARD macro for the pagination option parameters.
Thanks for this awesome gem.
Is there any way I can use this gem or accessing the AngelList API without any user interaction (just the server talking to the API)? I couldn't see how I could use oAuth for this purpose since you need to request a bearer token and then store it in a session.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.