sheetpoetry

(Puedes leer esto en español aquí)

What is this?

This is a GraphQL API to generate poems from randomly selected cells on a Google Spreadsheet.

How to use

The API takes a query called sheetpoem with 3 arguments:

  • spreadsheetId (String): The spreadsheet's ID.
  • range (String): The range of cells.
  • verses (Int): The number of verses.

The spreadsheetId is your spreadsheet's unique identificator. Is the part of the URL selected in the image below and it looks similar to this: 1qjgDw3TREpqQoSSbB0tzd0Joues1jraJix2mU52zToU.

spreadsheet Id

range is a selection of rows and cells. For a selection like the one shown below it would be: A1:D18.

range

And verses is a number, like 1, 6 or 3021, representing how many verses you want your poem to have.

That being said, an example query would look something similar to this:

query {
sheetpoem(spreadsheetId: "1qjgDw3TREpqQoSSbB0tzd0Joues1jraJix2mU52zToU", range: "A1:B50", verses: 4)
}

You can try this query live at the GraphQL Playground.

Example

For this example we are using this spreadsheet with "1000 chilean verses" selected by Felipe Cussen and Marcela Labraña.

|

sheetpoetry.xyz

Built with Gatsby and Vercel.