These functions modify existing data on GlassFrog with PATCH HTTP requests.
They are only available for Roles, People, Projects, Metrics, and Checklist Items.
All PATCH functions begin with the patch function.
gf.patch() ...Assigns a role with the id of $ROLEID to a person with the id of $PERSONID:
gf.patch().roles().withID($ROLEID).add().to().people().withID($PERSONID).then(...).catch(...);Removes a role with the id of $ROLEID from a person with the id of $PERSONID:
gf.patch().roles().withID($ROLEID).remove().from().people().withID($PERSONID).then(...).catch(...);Updates a person with the id of $ID in GlassFrog with the new attributes of $ATTRIBUTES:
gf.patch().people().withID($ID).change($ATTRIBUTES).then(...).catch(...);{
"name": "Sally Benally",
"email": "sally@example.com"
}Updates a project with the id of $ID in GlassFrog with the new attributes of $ATTRIBUTES:
gf.patch().projects().withID($ID).change($ATTRIBUTES).then(...).catch(...);{
"description": "API docs updated",
"circle_id": 346,
"role_id": 2331
}Changes the status of a project with the id of $ID to archived:
gf.patch().projects().withID($ID).archive().then(...).catch(...);Updates a metric with the id of $ID in GlassFrog with the new attributes of $ATTRIBUTES:
gf.patch().metrics().withID($ID).change($ATTRIBUTES).then(...).catch(...);{
"description": "A New Metric",
"frequency": "Weekly",
"circle_id": 856843816,
"role_id": 905502603
}Updates a checklist item with the id of $ID in GlassFrog with the new attributes of $ATTRIBUTES:
gf.patch().checklistItems().withID($ID).change($ATTRIBUTES).then(...).catch(...);{
"description": "A New Item",
"frequency": "Weekly",
"circle_id": 856843816,
"role_id": 905502603
}