raindrop

package
v0.0.0-...-4b397a5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const BASE_URL = "https://api.raindrop.io/rest/v1"

Variables

This section is empty.

Functions

func GetRequest

func GetRequest(path string) (*http.Response, error)

Types

type Access

type Access struct {
	/**
	  1 - read only access (equal to public=true)
	  2 - collaborator with read only access
	  3 - collaborator with write only access
	  4 - owner
	*/
	Level     int
	Draggable bool // Does it possible to change parent of this collection?
	Root      *bool
}

type Collaborators

type Collaborators struct{}

type Collection

type Collection struct {
	Id            int `json:"_id"` // The id of the Collection
	Access        Access
	Author        *bool          // user is the author
	Collaborators *Collaborators // When this object is present, means that collections is shared. Content of this object is private and not very useful.
	Color         *string        // primary color of the collection as HEX
	Count         int            // count of raindrops in collection
	Cover         []string       // Collection cover URL. This array always have one item due to legacy reasons
	Created       string         // when the collection is created
	// creatorRef
	Expanded   bool // Whether the collection’s sub-collections are expanded
	LastAction string
	LastUpdate string // When the collection is updated
	Parent     *Parent
	Public     bool // Collection and raindrops that it contains will be accessible without authentication by public link
	Slug       string
	Sort       int    // The order of collection (descending). Defines the position of the collection among all the collections with the same parent.$id
	Title      string // Name of the collection
	User       User
	/**
	  view style of Collection
	  - list (default)
	  - simple
	  - grid
	  - masonry (Pinterest like grid)
	*/
	View string
}

func GetCollections

func GetCollections() ([]Collection, error)

type Parent

type Parent struct {
	// the id of the parent collection. Not specified for root collections
	Id int `json:"$id"`
}

type Raindrop

type Raindrop struct {
	Id         int `json:"_id"` // The id of the Collection
	Collection RaindropCollection

	Cover      string // Cover URL
	Created    string // when the raindrop was created
	Domain     string // hostname of a link. Files always have raindrop.io hostname
	Excerpt    string // description
	LastUpdate string // When the raindrop was updated
	Link       string // url
	Media      []RaindropMedia
	Tags       []string // tags list
	Title      string   // Name of the collection
	Type       string   // link article image video document or audio
	User       User
}

func GetRaindrop

func GetRaindrop(id string) (Raindrop, error)

func GetRaindrops

func GetRaindrops(search string) ([]Raindrop, error)

func GetRaindropsForCollection

func GetRaindropsForCollection(collection string) ([]Raindrop, error)

type RaindropCollection

type RaindropCollection struct {
	// id of the collection the raindrop resides in
	Id int `json:"$id"`
}

type RaindropMedia

type RaindropMedia struct {
	Link string // url of cover
}

type User

type User struct {
	// owner id
	Id int `json:"$id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL