KateHyoung / UTDEventData

An R package to retrieve political event data from the UTD API server
GNU Lesser General Public License v3.0
16 stars 7 forks source link

The Table class isn't working #10

Open andrewheiss opened 5 years ago

andrewheiss commented 5 years ago

Following the vignette, creating an object from the Table class doesn't work:

# creating an object
obj <- Table$new()
# Error: object 'Table' not found
KateHyoung commented 5 years ago

Thank you, @andrewheiss, for finding the error of Table. I have fixed it, and it is working now as no error returns.

> obj<-Table$new()

Nevertheless, our team is thinking to drop out this reference class from the library because we think that storing an API key as an environment variable is more convenient.

Please let us know if you have a better idea on this issue.

andrewheiss commented 5 years ago

Hi! I think the best solution is really to use environment variables, as you've started doing, but wire them into the functions more directly instead of requiring api_key in every function. Packages like analogsea and qualtRics do this really well, storing API credentials as environment variable in ~/.Rprofile and not requiring them to be passed through functions, while also avoiding complex S4-style classes