An interface to theRequestTrackerAPI.
install.packages("rt")To start using thert package, log in to your RTinstance by setting the server URL in usingSys.setenv andusert_login() to log in and store your sessionlocally.
Below, we log into Best Practical’s demo installation of RT:
library(rt)Sys.setenv("RT_BASE_URL"="https://demo.bestpractical.com")rt_login()# Enter demo/demoOnce you are successfully logged in, you’re all set to use thepackage. Thert package supports all of theRequestTracker RESTAPI:
rt_login()rt_logout()rt_ticket_properties()rt_ticket_links()rt_ticket_attachments()rt_ticket_attachment()rt_ticket_attachment_content()rt_ticket_history()rt_ticket_history_entry()rt_ticket_search()rt_ticket_create()rt_ticket_edit()rt_ticket_history_reply()rt_ticket_history_comment()rt_ticket_links_edit()rt_user_properties()rt_user_create()rt_user_edit()rt_queue_properties()Note: Most of these functions support being chained together (forexample, with the%>%).
See the included vignettes for more information about usage.
To log out, use thert_logout function (or restart yourR session):
rt_logout()A test suite is provided that is comprised mostly of integrationtests that are configured to run against a local installation of RT. Bydefault, runningdevtools::test() will only run a smallsubset of the full test suite: those that do not depend on being able tocall out to an RT installation (i.e., unit tests).
To run the full test suite locally,
Start a local RT installation withDocker:
docker run-d--name rt-p 80:80 netsandbox/request-trackerTurn on integration tests for your session
Sys.setenv("RT_INTEGRATION"=TRUE)Rundevtools::test() from the same session as(2)
rt_api objectsAll API calls go through an intermediate state as anrt_api object, which is made up of three parts:
content, generally returned as a tibble/dataframepath or URL that was accessedresponse from the API.This is mainly to help normalize out some of the inconsistencies inthe RT API itself and make implementing the API call wrapperseasier.
Let us know aboutany issues or bugs.
Support was provided by the National Center for Ecological Analysisand Synthesis, a Center funded by the University of California, SantaBarbara, and the State of California.