Core namespace for interacting with the Makeshot.ai API. Provides utility functions for generating API URLs and processing data.
Core namespace for interacting with the Makeshot.ai API. Provides utility functions for generating API URLs and processing data.
(extract-shot-metadata shot-data)Extracts relevant metadata from a Makeshot.ai shot data structure.
shot-data: A map representing a single shot from the Makeshot.ai API.
Returns a map containing the shot's ID, name, and status.
Example: (extract-shot-metadata {:id 123, :name "Awesome Shot", :status "completed", :other "stuff"}) ;=> {:id 123, :name "Awesome Shot", :status "completed"}
Extracts relevant metadata from a Makeshot.ai shot data structure.
shot-data: A map representing a single shot from the Makeshot.ai API.
Returns a map containing the shot's ID, name, and status.
Example:
(extract-shot-metadata {:id 123, :name "Awesome Shot", :status "completed", :other "stuff"})
;=> {:id 123, :name "Awesome Shot", :status "completed"}(generate-makeshot-url endpoint)(generate-makeshot-url endpoint params)Generates a Makeshot.ai API URL based on the endpoint and optional parameters.
endpoint: The API endpoint (e.g., "projects", "shots"). params: An optional map of query parameters to include in the URL.
Example: (generate-makeshot-url "projects" {:status "active", :limit 10}) ;=> "https://makeshot.ai/api/projects?status=active&limit=10"
Generates a Makeshot.ai API URL based on the endpoint and optional parameters.
endpoint: The API endpoint (e.g., "projects", "shots").
params: An optional map of query parameters to include in the URL.
Example:
(generate-makeshot-url "projects" {:status "active", :limit 10})
;=> "https://makeshot.ai/api/projects?status=active&limit=10"(mock-project-data num-projects)Generates mock project data for testing purposes.
num-projects: The number of mock projects to generate.
Returns a vector of maps, each representing a mock project. Each project contains a unique ID, a randomly generated name, and a status of "active".
Example: (mock-project-data 3) ;=> [{:id 1, :name "Project 1", :status "active"} ; {:id 2, :name "Project 2", :status "active"} ; {:id 3, :name "Project 3", :status "active"}]
Generates mock project data for testing purposes.
num-projects: The number of mock projects to generate.
Returns a vector of maps, each representing a mock project. Each project
contains a unique ID, a randomly generated name, and a status of "active".
Example:
(mock-project-data 3)
;=> [{:id 1, :name "Project 1", :status "active"}
; {:id 2, :name "Project 2", :status "active"}
; {:id 3, :name "Project 3", :status "active"}]cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |