Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions repository/notion/getLog.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,37 @@ import (

type Database *notionapi.Database

func GetLog() (Database, error) {
err := godotenv.Load()
func GetLog(date string) (Log, error) {
db, err := GetDB()
// db.Query(context.Background(), notionapi.DatabaseQuery{
// Filter: notionapi.DatabaseQueryFilter{
// Property: "FilledAtr",
// Checkbox: &notionapi.DatabaseQueryCheckboxFilter{
// Equals: true,
// },
// },
// })

// ここで取得してくる

// ここでLogPropertyに型が合致しているかを確認する。

// LogPropertyをLogに変換する なんかいい感じにやってくれる関数を作成する

// ここでLogに型が合致しているかを確認する。

}

func GetDB() (Database, err error) {
err = godotenv.Load()
if err != nil {
fmt.Printf("読み込み出来ませんでした: %v", err)

}
integration_token := os.Getenv("NOTION_API_KEY")

client := notionapi.NewClient(notionapi.Token(integration_token))
db, err := client.Database.Get(context.Background(), notionapi.DatabaseID("8af74dfac9a0482bab353741bb355971"))
db, err = client.Database.Get(context.Background(), notionapi.DatabaseID("8af74dfac9a0482bab353741bb355971"))
if err != nil {
return nil, err
}
Expand Down
208 changes: 0 additions & 208 deletions repository/notion/log.go

This file was deleted.

140 changes: 0 additions & 140 deletions repository/notion/logList.go

This file was deleted.

Loading