There was a simple no cost json from this github called anon storage, I believe. https://github.com/samfisherirl/public-apis
I found this in its stead in the pull requests. I use it for testing non-commercial api data and for basic tasks between computers like sharing a local path.
https://getpantry.cloud/
Code: Select all
; docs https://getpantry.cloud/
if A_LineFile = A_ScriptFullPath && !A_IsCompiled
pantryExample()
pantryExample()
{
; Example usage:
PantryAPI.PantryID := "YOUR_PANTRY_ID" ; Set your Pantry ID (akin to api key)
PantryAPI.BasketName := "YOUR_BASKET_NAME" ; Set your Basket Name (akin to repo name)
; https://getpantry.cloud/#
MsgBox PantryAPI.NewBasket()
; Get basket contents
MsgBox PantryAPI.GetBasket()
; Update basket contents
NewData := '{"newKey": "newValue"}'
MsgBox PantryAPI.UpdateBasket(NewData)
; Delete basket
MsgBox PantryAPI.DeleteBasket()
}
class PantryAPI {
static PantryID := "" ; Your Pantry ID here
static BasketName := "" ; Your Basket Name here
static BaseURL := "https://getpantry.cloud/apiv1/pantry/"
static basket := "/basket/"
static Headers := Map("Content-Type", "application/json")
static NewBasket()
{
Response := this.SendRequest("POST", "")
return Response
}
; Method to update the contents of a basket
static UpdateBasket(newData) {
Url := this.BaseURL
Response := this.SendRequest("PUT", newData)
return Response
}
; Method to get the contents of a basket
static GetBasket() {
Url := this.BaseURL
Response := this.SendRequest("GET")
return Response
}
; Method to delete a basket
static DeleteBasket() {
Url := this.BaseURL
Response := this.SendRequest("DELETE")
return Response
}
; Helper method to send an HTTP request
static SendRequest(Method, Data := "") {
HttpRequest := ComObject("WinHttp.WinHttpRequest.5.1")
HttpRequest.Open(Method, PantryAPI.BaseURL . PantryAPI.PantryID . PantryAPI.basket . PantryAPI.BasketName, false)
for Header, Value in PantryAPI.Headers
HttpRequest.SetRequestHeader(Header, Value)
if (Data != "")
HttpRequest.Send(Data)
else
HttpRequest.Send()
return HttpRequest.ResponseText
}
}