dstotijn / go-notion

Go client for the Notion API.
MIT License
380 stars 39 forks source link

Parsing time error in `FindBlockChildrenByID` function #9

Closed boltlessengineer closed 3 years ago

boltlessengineer commented 3 years ago

Thank you for making golang sdk for notion api.

I get an error when I run this code.

func main() {
  a, err := notion.NewClient(MY_TOKEN).FindBlockChildrenByID(context.Background(), TEST_PAGE_ID)
  if err != nil {
    log.Println(err)
  }
  fmt.Println(a)
}
2021/05/23 15:24:30 notion: failed to parse HTTP response: parsing time ""2021-12-25"" as ""2006-01-02T15:04:05Z07:00"": cannot parse """ as "T"
{[] false <nil>}

my go.mod file

module main

go 1.14

require (
        github.com/dstotijn/go-notion v0.1.5
)
dstotijn commented 3 years ago

Released a new version, v0.2.0, which should handle Notion date properties, supporting optional time. See the release notes for more information. Feel free to re-open if you run into anything.