Sample ruby code to integrate with Fieldwire:
- fieldwire.rb is the entry point
- lib showcases the following:
- How to call our super endpoints? (accounts, users etc.)
- How to call out US or EU regional endpoints (projects, templates etc.)
- How to refresh access tokens programmatically when they expire
- How to put all of these together for particular use cases
- Install the required ruby version (from
.ruby-version) (ex: using rbenv) - Install the dependencies using
bundle install - Fill out the required pieces of info in fieldwire.rb (Marked with
# REPLACE) - Run script using
bundle exec ruby fieldwire.rb
Please store your tokens securely & use them across invocations of your integration setup to prevent hitting rate limits while refreshing the access token