Package pinboard implements a golang wrapper for the pinboard api.
Please refer to GoDoc for up-to-date documentation.
Pinboard golang package.
License: ISC License
I'm encountering an error when trying to use the PostDates function.
json: cannot unmarshal number into Go struct field postsDatesResponse.dates of type string
It looks like the response from https://api.pinboard.in/v1/posts/dates for the count
field is actually a JSON integer, not a string.
This causes the library to error when trying to unmarshal the JSON response into postDatesResponse.dates
which is a map[string]string
. It seems this type should instead be a map[string]int
When doing a curl request to the API with my token, I get the following:
curl 'https://api.pinboard.in/v1/posts/dates?auth_token=REDACTED&format=json' -H 'accept: application/json'
{
"user": "me",
"tag": "",
"dates": {
"2021-08-28": 2,
"2021-08-25": 1,
"2021-08-05": 1,
"2021-07-26": 1,
"2021-07-08": 2,
"2021-06-15": 1,
"2021-05-30": 1,
"2021-02-21": 1,
"2020-10-12": 1,
"2020-10-10": 2,
"2020-10-02": 87
}
}
Hello Wally,
I found a bug :)
Line 74 in a0e0a7d
If p.tags equals an empty string, then tags equals []string{""}
whereas it should be equal to []string
. This is due to the way strings.Split works.
Here is the fix;
var tags []string
if p.Tags != "" {
tags = strings.Split(p.Tags, " ")
} else {
tags = make([]string, 0, 0)
}
Thank you for this package,
Have a good day
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.