Documentation
¶
Index ¶
Constants ¶
View Source
const ( ListingsRoute = "Listings" ProfileRoute = "Profile" )
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
CheckResponse checks the API response for errors. A response is considered an error if the status code is outside the 200 range
func NewAPIRouter ¶
Types ¶
type AuthOptions ¶
type AuthOptions struct {
ApplicationID string `url:"appid,omitempty"`
ApplicationSecret string `url:"secret,omitempty"`
}
AuthOptions specifies key and secret used to authenticate to the API
type Client ¶
type Client struct {
// Services used to communicate with different parts of BTCJam.
Listings ListingsService
// Base URL for API requests, which should have a trailing slash.
BaseURL *url.URL
// Contains a struct with the authentication options for the API
AuthenticationOptions *AuthOptions
// contains filtered or unexported fields
}
func (*Client) NewRequest ¶
func (*Client) SetAuthentication ¶
SetAuthentication allows the user to set the id and secret used to authenticate against the API
type Listing ¶
type Listing struct {
Data ListingData `json:"listing"`
}
This holds all listing data
type ListingData ¶
type ListingData struct {
Id int
Title string
Term int
Description string
Amount float64 `json:",string"`
AmountFundedRaw json.RawMessage `json:"amount_funded,omitempty"`
AmountFunded float64
NumberOfPayments int `json:"number_of_payments"`
PaymentCycle int `json:"payment_cycle_days"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
Rate float64 `json:"rate,string"`
PeriodicPaymentAmount float64 `json:"periodic_payment_amount"`
DenominatedIn string `json:"denominated_in"`
ListingStatus string `json:"listing_status"`
LoanPurpose string `json:"loan_purpose"`
PercentFunded int `json:"percent_funded"`
ListingScore int `json:"listing_score"`
User User `json:"user"`
}
All the data belonging to a single listing
type ListingsService ¶
ListingsService communicates with the listings endpoint of the BTCJam API.
type ProfileService ¶
ProfileService communicates with the profile endpoint of the BTCJam API.
type User ¶
type User struct {
Country string
PositiveRepCount int `json:"positive_count_reputation"`
NegativeRepCount int `json:"negative_count_reputation"`
CanBorrow bool `json:"can_borrow"`
CanTrade bool `json:"can_trade"`
BTCTalkVerified bool `json:"bitcointalk_accound_verified"`
BTCJamScore float64 `json:"btcjam_score_numeric,string"`
BTCJamCode string `json:"btcjam_score"`
AddressVerified bool `json:"address_verified"`
IdentityVerified bool `json:"identity_verified"`
PhoneVerified bool `json:"phone_verified"`
FacebookConnected bool `json:"facebook_connected"`
FacebookFriendCount int `json:"facebook_friend_count"`
LinkedinConnected bool `json:"linkedin_connected"`
PaypalConnected bool `json:"paypal_verified_account_connected"`
PaypalAccountDate string `json:"paypal_account_date"`
RepaidLoansCount int `json:"repaid_loans_count"`
RepaidLoansAmount float64 `json:"repaid_loans_amount"`
LateLoansCount int `json:"late_loans_count"`
LateLoansAmount float64 `json:"late_loans_amount"`
OpenCreditLinesCount int `json:"open_credit_lines_count"`
OpenCreditLinesAmount float64 `json:"open_credit_lines_amount"`
MadeLatePaymentsCount int `json:"made_late_payments_count"`
}
All information about a user belonging to a listing
Click to show internal directories.
Click to hide internal directories.