Home
markhornak edited this page Jun 21, 2023
·
3 revisions
Clone this wiki locally
The SDK Documentation is split in two pages. The main SDK Reference page has documentation about the Guru object. This includes all methods you call like this:
import guru
g = guru.Guru()
cards = g.find_cards(collection="Sales")
All methods that belong to that Guru
object are documented here. This includes things like:
- Getting a list of cards.
- Finding a group by its name or ID.
- Inviting a user to your team.
- Adding a user to a group.
And there are tons more! The reference page has the full list.
Data Objects
The core methods often return objects. When you get a list of cards, each result is a Card object. There are object types for folders, collections, cards, questions, groups, users, etc. The full reference for all data objects is found here.
These objects have methods too. For example, here are three ways you can archive a card:
import guru
g = guru.Guru()
# first way: using the card's ID without loading the card:
g.archive_card("2ab6f227-c663-4a3b-8cd2-58f694f05622")
# second way: loading the card and passing it to archive_card:
card = g.get_card("2ab6f227-c663-4a3b-8cd2-58f694f05622")
g.archive_card(card)
# third way: loading the card and calling its archive method:
card = g.get_card("2ab6f227-c663-4a3b-8cd2-58f694f05622")
card.archive()
Often the simplest way to do these operations is by calling the methods that belong to the data objects.