Skip to content

Commit

Permalink
Code are generated by openapi generator (#423)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
github-actions[bot] and github-actions authored Feb 6, 2024
1 parent 0cbcbad commit 1e249bb
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion line-openapi
Submodule line-openapi updated 1 files
+11 −0 webhook.yml
1 change: 1 addition & 0 deletions linebot/webhook/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ model_emoji.go
model_event.go
model_event_mode.go
model_file_message_content.go
model_follow_detail.go
model_follow_event.go
model_group_source.go
model_image_message_content.go
Expand Down
31 changes: 31 additions & 0 deletions linebot/webhook/model_follow_detail.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Webhook Type Definition
* Webhook event definition of the LINE Messaging API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

//go:generate python3 ../../generate-code.py
package webhook

// FollowDetail
// FollowDetail

type FollowDetail struct {

/**
* Whether a user has added your LINE Official Account as a friend or unblocked. (Required)
*/
IsUnblocked bool `json:"isUnblocked"`
}
14 changes: 14 additions & 0 deletions linebot/webhook/model_follow_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ type FollowEvent struct {
* Reply token used to send reply message to this event (Required)
*/
ReplyToken string `json:"replyToken"`

/**
* Get Follow
*/
Follow *FollowDetail `json:"follow"`
}

func (cr *FollowEvent) UnmarshalJSON(data []byte) error {
Expand Down Expand Up @@ -134,6 +139,15 @@ func (cr *FollowEvent) UnmarshalJSON(data []byte) error {

}

if raw["follow"] != nil {

err = json.Unmarshal(raw["follow"], &cr.Follow)
if err != nil {
return fmt.Errorf("JSON parse error in FollowDetail(Follow): %w", err)
}

}

return nil
}

Expand Down

0 comments on commit 1e249bb

Please sign in to comment.