Skip to content

Latest commit

 

History

History
105 lines (80 loc) · 1.52 KB

File metadata and controls

105 lines (80 loc) · 1.52 KB
weight 11
title Kittens

Kittens

Get All Kittens

package main

import "github.com/bep/kittn/auth"

func main() {
	api := auth.Authorize("meowmeowmeow")

	_ = api.GetKittens()
}
require 'kittn'

api = Kittn::APIClient.authorize!('meowmeowmeow')
api.kittens.get
import kittn

api = kittn.authorize('meowmeowmeow')
api.kittens.get()
<example>
blablabla
</example>
library("kitten")
kt_authorize()
kt_get()
curl "http://example.com/api/kittens"
  -H "Authorization: meowmeowmeow"
public class MyClass {
  public static void main(String[] args) {
    System.out.println("Hello World");
  }
}
const kittn = require('kittn');

let api = kittn.authorize('meowmeowmeow');
let kittens = api.kittens.get();

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "name": "Fluffums",
    "breed": "calico",
    "fluffiness": 6,
    "cuteness": 7
  },
  {
    "id": 2,
    "name": "Max",
    "breed": "unknown",
    "fluffiness": 5,
    "cuteness": 10
  }
]

This endpoint retrieves all kittens.

HTTP Request

GET http://example.com/api/kittens

Query Parameters

Parameter Default Description
include_cats false If set to true, the result will also include cats.
available true If set to false, the result will include kittens that have already been adopted.
Remember — a happy kitten is an authenticated kitten!