Skip to content

Instantly share code, notes, and snippets.

@sunny
Last active February 26, 2024 12:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunny/07db54478ac030bd277c19cfe734648b to your computer and use it in GitHub Desktop.
Save sunny/07db54478ac030bd277c19cfe734648b to your computer and use it in GitHub Desktop.
Cults query examples
mutation {
createCreation(
name: "Cults Logo"
description: "A Cults logo, to test the API"
imageUrls: ["https://wtf.sunfox.org/3d/cults-logo.jpg"]
fileUrls: ["https://wtf.sunfox.org/3d/cults-logo.stl"]
locale: EN
# Identifier for the “Art” category. Check out the list of categories to find their id.
categoryId: "Q2F0ZWdvcnkvMjM="
# Identifier for the “Fan Art” sub-category of the “Art” category.
subCategoryIds: ["Q2F0ZWdvcnkvMzc"]
downloadPrice: 42.5
currency: EUR
# Optional: do not provide a license code to use the default ("Cults - Private Use").
# For priced designs, you can use "cults_cu" or "cults_cu_nd".
# For free designs check out the full list of licenses.
licenseCode: "cults_cu"
) {
creation {
url(locale: EN)
}
errors
}
}
{
creationsBatch(onlyDiscounted: true) {
results {
name(locale: EN)
shortUrl
price(currency: EUR) { cents }
discount {
percentage
originalPrice(currency: EUR) { cents }
startAt
endAt
}
}
}
}
{
licenses {
code
name(locale: EN)
url(locale: EN)
availableOnFreeDesigns
availableOnPricedDesigns
}
}
{
me {
salesBatch(limit: 3, offset: 0) {
total
results {
creation { name(locale: EN) }
user { nick }
income(currency: EUR) { cents }
createdAt
payedOutAt
}
}
}
}
{
creationsSearchBatch(query: "batman", limit: 3) {
total
results {
name(locale: EN)
shortUrl
}
}
}
{
creation(slug: "print-in-place-cute-lucky-bunny") {
name(locale: EN)
shortUrl
illustrationImageUrl
license {
name(locale: EN)
}
category {
name(locale: EN)
}
publishedAt
viewsCount
likesCount
downloadsCount
tags(locale: EN)
price(currency: USD) {
cents
}
creator {
nick
shortUrl
}
}
}
{
user(nick: "bigovereasy") {
bio
shortUrl
imageUrl
creationsCount
creations(limit: 3, sort: BY_LIKES) {
name(locale: EN)
shortUrl
illustrationImageUrl
}
}
}
{
categories {
id
name(locale: EN)
children {
id
name(locale: EN)
}
}
}
{
creationsBatch(sort: BY_PUBLICATION, limit: 3) {
results {
name(locale: EN)
shortUrl
}
}
}
{
me {
creations(limit: 10, offset: 0) { {
name(locale: EN)
url(locale: EN)
illustrationImageUrl
downloadsCount
viewsCount
totalSalesAmount(currency: USD) { cents }
blueprints {
fileUrl
imageUrl
}
}
}
}
{
me {
likedCreations(limit: 10, offset: 0) {
name(locale: EN)
url(locale: EN)
}
}
}
mutation {
updateCreation(
id: "…"
downloadPrice: 4.2
currency: EUR
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment