Table of Contents |
---|
...
Creating a Supply Label
SDK
Use tab completion with SDK to auto-complete function names or show field options!
Code Block |
---|
In [40]: label = springserve.supply_labels.new({"name": "API Docs label"}) In [41]: print label.id, label.name 1764 API Docs label |
REST API
POST /api/v0/supply_labels
...
Code Block |
---|
{ "id": 353, "name": "API Docs label", "account_id": 1 } |
...
Get a Supply Label
SDK
Code Block |
---|
In [1]: label = springserve.supply_labels.get(1764) In [2]: print label.name "API Docs label" |
REST API
GET /api/v0/supply_labels/<id>
...
Code Block |
---|
{ "id": 1764, "name": "API Docs label", "account_id": 1 } |
Edit a Supply Label
SDK
Code Block |
---|
In [1]: label = springserve.supply_labels.get(353) In [2]: label.name = "I want to change the name" In [3]: changed = label.save() In [4]: changed.ok Out [4]: True In [5]: print changed.name "I want to change the name" |
REST API
PUT /api/v0/supply_labels/<id>
...