client

package module
v0.0.0-...-842c8fd Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2017 License: MIT Imports: 1 Imported by: 1

README

airbnb-api-client

Airbnb api client for golang

Documentation

Index

Constants

View Source
const BASE_URL string = "https://www.airbnb.com/api/v1/listings/"

Variables

This section is empty.

Functions

This section is empty.

Types

type AirBNB

type AirBNB struct {
	ApiKey string
}

func (*AirBNB) ReadListing

func (api *AirBNB) ReadListing(id string) (listingResponse ListingResponse, errorResponse ErrorResponse, err error)

type ErrorResponse

type ErrorResponse struct {
	ErrorCode    int    `json:"error_code"`
	Error        string `json:"error"`
	ErrorMessage string `json:"error_message"`
}

type ListingResponse

type ListingResponse struct {
	Listing struct {
		Id                    int64    `json:"id"`
		City                  string   `json:"city"`
		UserId                int64    `json:"user_id"`
		Latitude              float64  `json:"lat"`
		Longitude             float64  `json:"lng"`
		Bathrooms             float64  `json:"bathrooms"`
		Bedrooms              float64  `json:"bedrooms"`
		Beds                  float64  `json:"beds"`
		PersonCapacity        int      `json:"person_capacity"`
		CountryCode           string   `json:"country_code"`
		Amenities             []string `json:"amenities"`
		AmenitiesIds          []int64  `json:"amenities_ids"`
		IsLocationExact       bool     `json:"is_location_exact"`
		InBuilding            bool     `json:"in_building"`
		InLandlordPartnership bool     `json:"in_toto_area"`
	} `json:"listing"`
}

type Params

type Params struct {
	Key string `url:"key,omitempty"`
}

Jump to

Keyboard shortcuts

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