Collected Docs: API

Collected Source GraphQL

Query & load content from Trello, GitHub.

Try online: https://1.source.collected.design/graphiql

End-point

https://1.source.collected.design/graphql

GraphQL examples

GitHub: All files in the RoyalIcing/lofi-bootstrap repo

gitHubRepo(owner: "RoyalIcing", repoName: "lofi-bootstrap") {
  owner,
  files {
    path
    content
  }
}

GitHub: All NPM projects in the zendeskgarden/react-components monorepo

{
  gitHubRepo(owner: "zendeskgarden", repoName: "react-components") {
    npmProjects {
      directoryPath
      name
      version
      private
      license
      homepage
      npmOrgURL
      dependencies {
        items {
          name
          rule
        }
      }
    }
  }
}

Trello: Lists and their cards in a board

query Trello {
  trelloBoard(id: "580710faeb62c4f7a6fa7786") {
    name
    id
    lists {
      id
      name
      cards {
        id
        name {
          text
        }
        desc {
          source
        }
      }
    }
  }
}

Trello: Cards tagged #page in a list named ‘Stripe stripe.com’

{
  collectedNavs: trelloBoard(id: "4wctPH1u") {
    name
    lists(q: "Stripe stripe.com") {
      name
      pages: cards(tags: ["page"]) {
        name {
          text
        }
        body: desc {
          headings {
            text,
            level
          }
        }
      }
    }
  }
}

Collected Source REST

Load from Trello, GitHub.

Formats: JSON.

Base URL

https://1.source.collected.design

REST examples

List files in a GitHub repo

GET https://1.source.collected.design/github/RoyalIcing/lofi-bootstrap/master/command:list?content

List cards in a Trello board

GET https://1.source.collected.design/trello/580710faeb62c4f7a6fa7786