Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[feat/company-all-with-offset] improve Get all companies with other information #1

Merged
merged 42 commits into from
Nov 2, 2018

Conversation

CarolHsu
Copy link

Add new method #all_with_offset to return not only results as response but also hasMore and offset, so it would be possible to get all companies. For instance

response = Hubspot::Company.all_with_offset(count: 100)
while response.hasMore
  # DO SOMETHING
  response = Hubspot::Company.all_with_offset(count: 100, offset: response.offset)
end

blakewest and others added 30 commits March 30, 2017 17:02
- This commit lets the user pass an "access_token" to Hubspot.configure. At that point,
if an access token is passed, we set default headers on the Connection class, and this supports OAuth.

- I added a check in the get_url method which will not set an API key if an access token is present. This is required. Otherwise, Hubspot will fail the request, thinking that the api key was the intended auth method, but that the key was blank.
- This class is responsbile for grabbing and refreshing OAuth access tokens.
- It just returns the results to you for the caller to actually do something with them.
- It inherits from the Connection class because it needs to re-use many of the methods for consistency, yet actually has fairly different needs. The headers are form-urlencoded, not json. So using the existing post_json methods would have required some re-jiggering to work correctly here. Also, these dont' require an API key in the same way as the others, so we would have to always pass in "hapikey": false, and this would have required more changes to the post_json method. Lastly, of course you aren't actually posting json here! So using that method would be extra weird.
…ociate-notes-with-deals

add the ability to associate an engagement note with a deal id
…nandooliveira/hubspot-ruby into nandooliveira-feature/find_deals_by_association
@CarolHsu
Copy link
Author

CarolHsu commented Oct 30, 2018

@paulld I have no permission for this repo. I would like to add
Hubspot::Company.all_with_offset to allow iterated grab companies.

Please do review and merge this PR if everything's fine.

the previous PR has been accepted, so there's commits which already rebased to master of the original repo.

you can simply check last 3 commits of mine.
HubspotCommunity#134

@paulld
Copy link
Member

paulld commented Nov 2, 2018

@CarolHsu I added you to the repo sorry

@CarolHsu
Copy link
Author

CarolHsu commented Nov 2, 2018

Thanks @paulld, you can either merge this PR (which seems I have no access to do it), or wait for my PR being accepted officially (today or this weekend I guess). then let's no longer to keep this temporary repo ever.

@paulld paulld merged commit 280d1b5 into easyship:develop Nov 2, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants