Code Monkey home page Code Monkey logo

hubspot's People

Contributors

deneara avatar jonmcalder avatar maelle avatar miahatton avatar seanofahey avatar stephlocke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hubspot's Issues

Rename & reorganize all functions like hs_deals_raw() and hs_deals_tidy()

How do we name raw getters and functions returning tidy output?

One solution by Steph

raw_deals<-raw_all_deals()
deal_props <- tidy_all_deals(raw_deals, view = "property_versions")
deal_associations <- tidy_all_deals(raw_deals, view = associations")

Seeing that I'm wondering whether all raw getters should return a R6 object that's not much different from a list except it has tidy() methods that depends on the function that created it. But maybe get_deals()$view("associations") is not an intuitive syntax. It could also be get_deals()$associations() or so to take more advantage of tab-autocompletion.

R files

I wonder whether there should be one R script by entity.

Think harder about the scopes for the default app?

Currently the default OAuth app asks for a lot of different scopes including e.g. content that's only available to marketing professional or enterprise account. https://developers.hubspot.com/docs/methods/oauth2/initiate-oauth-integration?_ga=2.118505865.1889963731.1575269876-1134397846.1571640267#scopes

I suppose we should keep only the scopes that are available to any account (contacts, forms) as compulsory scopes and make the other optional + error well when they're not available.

Fix tests

They're failing at the moment, from a quick look it seems the data returned by the API changed.

Related to #4

Extend getOwners.R with includeInactive property

When a user (owner) is deactivated in HubSpot they are not removed from deals as the owner. This can cause downstream issues. It would be useful to be able to set the "includeInactive" property on the hubspot api call (owners/v2/owners) when calling getOwners.

set_renv not handling my file path

The set_renv() function is returning weirdly for me. The below file path is the one generated in the token create function.

> set_renv("HUBSPOT_PAT" = "C:\\Users\\steph\\OneDrive\\Documents/.hubspot_token1.rds")
> Sys.getenv("HUBSPOT_PAT")
[1] "C:UsersstephOneDriveDocuments/.hubspot_token1.rds"

Incorrect parameter name

I just hot fixed the parameter for get_contacts(). It seems that the incorrect label of properties was being added, not property. All the other getters with functions should be checked for the same issue.

f7a245c

InheritParams

If all goes well I'll have a big table of methods and params which should help knowing where to define params to have them inherited.

Maybe there could be one false function not exported but documented that just exists to document all params in one place.

Create issues for different API endpoints

We need issues filed that will help people start developing functions for the Hubspot API.

For each category e.g. deals, we need to identify any relevant get_ functions needed and any view functions over the top of the gets. So far for deals, companies, and pipelines I've done some work and used gets for each entity type. Some gets had very simple responses like deal properties so did not need further manipulation, but many need multiple functions for extracting different slices of data in a tabular way.

Each issue should provide instructions for:

  • Where the docs are for the endpoint(s)
  • What endpoints need covering (for now just data extraction)
  • Recommendations for gets and tabular functions
  • Suggested tests

Why create a (native) R API client library?

Pretty sure I know some / most of the reasons why, but thought maybe asking the question could surface some valuable considerations / responses (both for this use case and others like it).

Given the relative ease with which one can use reticulate to call Python functions from R, why not rely on a Python package like hapipy or hubspot3 to retrieve data rather than creating an R package?

i.e. Assuming that (a) the end goal is to retrieve data via an API and use it in R, and (b) a Python API client library exists but no R API client library exists; when should one go to the effort of creating an R API client library?

Remove warnings in deal_properties()

Maybe they're ok to simply suppress.

hubspot::deal_properties()
#> Warning in .p(column, ...): NAs introduced by coercion

#> Warning in .p(column, ...): NAs introduced by coercion

#> Warning in .p(column, ...): NAs introduced by coercion
#> # A tibble: 1 x 19
#>   dealId dealname hs_all_accessib… amount closedate          
#>    <dbl> <chr>    <chr>             <dbl> <dttm>             
#> 1 9.32e8 Example… ""                  100 2019-08-02 23:58:38
#> # … with 14 more variables: num_associated_contacts <dbl>,
#> #   hs_all_team_ids <chr>, createdate <dttm>,
#> #   amount_in_home_currency <dbl>, days_to_close <dbl>, pipeline <chr>,
#> #   hubspot_team_id <chr>, hubspot_owner_id <dbl>,
#> #   hs_lastmodifieddate <dttm>, hubspot_owner_assigneddate <dttm>,
#> #   dealstage <chr>, hs_createdate <dttm>, hs_object_id <dbl>,
#> #   hs_all_owner_ids <dbl>

Created on 2019-10-21 by the reprex package (v0.3.0)

User agent

Should we add an user agent, that'd identify this package, maybe with its version?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.