api

package
v0.0.0-...-442a4c8 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2018 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Badge

type Badge struct {
	Kind string `json:"kind"`
}

Badge represents a single badge

type Checksum

type Checksum struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

Checksum describes a checksum that can be used to check for file validity for example using sha256 in the Type field and the actual sha256 in the Value

type Dataset

type Dataset struct {
	Badges           []Badge        `json:"badges"`
	CreatedAt        string         `json:"created_at"`
	Deleted          *bool          `json:"deleted"`
	Description      string         `json:"description"`
	Extras           *Extras        `json:"extras"`
	Frequency        string         `json:"frequency"`
	FrequencyDate    string         `json:"frequency_date"` // Next expected update date, you will be notified once that date is reached.
	ID               string         `json:"id"`
	LastModified     string         `json:"last_modified"`
	LastUpdate       string         `json:"last_update"`
	License          string         `json:"license"`
	Metrics          *Metrics       `json:"metrics"`
	Organization     *Organization  `json:"organization"`
	Owner            *UserReference `json:"owner"`
	Page             string         `json:"page"`
	Private          bool           `json:"private"`
	Resources        Resources      `json:"resources"`
	Slug             string         `json:"slug"`
	Spatial          Spatial        `json:"spatial"`
	Tags             []string       `json:"tags"`
	TemporalCoverage interface{}    `json:"temporal_coverage"` // TODO: Figure out what this field is
	Title            string         `json:"title"`
	URI              string         `json:"uri"`
}

Dataset is the top level structure defining a dataset

type Extras

type Extras interface{}

Extras is an unfixed key-value object

type Metrics

type Metrics struct {
	Badges         int `json:"badges"`
	Discussions    int `json:"discussions"`
	Followers      int `json:"followers"`
	Issues         int `json:"issues"`
	NbHits         int `json:"nb_hits"`
	NbUniqVisitors int `json:"nb_uniq_visitors"`
	NbVisits       int `json:"nb_visits"`
	Reuses         int `json:"reuses"`
	Views          int `json:"views"`
}

Metrics contains some information about

type Organization

type Organization struct {
	Acronym       interface{} `json:"acronym"`
	Class         string      `json:"class"`
	ID            string      `json:"id"`
	LogoThumbnail string      `json:"logo_thumbnail"`
	Name          string      `json:"name"`
	Page          string      `json:"page"`
	Slug          string      `json:"slug"`
	URI           string      `json:"uri"`
}

Organization represents a single org

type Resource

type Resource struct {
	Checksum     Checksum        `json:"checksum"`
	CreatedAt    string          `json:"created_at"`
	Description  *string         `json:"description"`
	Extras       Extras          `json:"extras"`
	Filesize     *int            `json:"filesize"`
	Filetype     string          `json:"filetype"`
	Format       string          `json:"format"`
	ID           string          `json:"id"`
	IsAvailable  bool            `json:"is_available"`
	LastModified string          `json:"last_modified"`
	Latest       string          `json:"latest"`
	Metrics      ResourceMetrics `json:"metrics"`
	Mime         *string         `json:"mime"`
	Published    string          `json:"published"`
	Title        string          `json:"title"`
	URL          string          `json:"url"`
}

Resource describes a single resource in the dataset API

type ResourceMetrics

type ResourceMetrics struct {
	NbHits         int `json:"nb_hits"`
	NbUniqVisitors int `json:"nb_uniq_visitors"`
	NbVisits       int `json:"nb_visits"`
	Views          int `json:"views"`
}

ResourceMetrics is a subset of Metrics which only contain Resource metrics

type Resources

type Resources []Resource

Resources is a slice of Resource

type Spatial

type Spatial struct {
	Geom        interface{} `json:"geom"`
	Granularity string      `json:"granularity"`
	Zones       []string    `json:"zones"`
}

Spatial contains some spatial information

type UserReference

type UserReference interface{}

UserReference represents a single user TODO: Generate that struct

Jump to

Keyboard shortcuts

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