Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Add webhook for form feature #341

Open
futag opened this issue Jul 12, 2022 · 12 comments
Open

Add webhook for form feature #341

futag opened this issue Jul 12, 2022 · 12 comments
Assignees

Comments

@futag
Copy link
Collaborator

futag commented Jul 12, 2022

Continue issue #296, maybe add some api webhook to Vtbot discord server to easier add and change vtuber state without login to github

@futag futag changed the title Add webhook for feature feature Add webhook for form feature Jul 12, 2022
@JustHumanz
Copy link
Owner

let me think for the flow

@futag
Copy link
Collaborator Author

futag commented Jul 14, 2022

Example, when send request post api, automatic send in webhook discord

@JustHumanz
Copy link
Owner

yeah, it's simple but can be dangerous if someone abuses the API

anyway, any idea about the payload?
should like this?

{
 "vtuber": "blabla",
 "current_state" : "Active",
 "update_state": "Inactive",
}

@futag
Copy link
Collaborator Author

futag commented Jul 16, 2022

yeah, but in 2 statement

  • Add new vtuber
  • edit current stage

But this playload like this

{
  "id": 1,
  "old" {
    "key": "value",
  },
  "new": {
    "key": "value"
  }
}

@futag
Copy link
Collaborator Author

futag commented Jul 16, 2022

there may be data that is deleted, data that is added, or there is also data that is changed

JustHumanz added a commit that referenced this issue Jul 21, 2022
@JustHumanz JustHumanz self-assigned this Jul 21, 2022
@JustHumanz
Copy link
Owner

JustHumanz commented Jul 21, 2022

Here for the json object request

Add

{
        "Name": "Kanochi",
        "EN_Name": "Mahoro Kano",
        "JP_Name": "鹿乃",
        "Twitter": {
            "Twitter_Fanart": "#まほろ絵",
            "Twitter_Lewd": "",
            "Twitter_Username": "kanomahoro"
        },
        "Youtube": null,
        "BiliBili": {
            "BiliBili_Fanart": "鹿乃絵",
            "BiliBili_ID": 316381099,
            "BiliRoom_ID": 15152878
        },
        "Twitch": null,
        "Region": "JP",
        "Fanbase": "",
    }

Update

{
    "ID": 14,
    "Old": {
        "Name": "Kanochi",
        "EN_Name": "Mahoro Kano",
        "JP_Name": "鹿乃",
        "Twitter": {
            "Twitter_Fanart": "#まほろ絵",
            "Twitter_Lewd": "",
            "Twitter_Username": "kanomahoro"
        },
        "Youtube": null,
        "BiliBili": {
            "BiliBili_Fanart": "鹿乃絵",
            "BiliBili_ID": 316381099,
            "BiliRoom_ID": 15152878
        },
        "Twitch": null,
        "Region": "JP",
        "Fanbase": "",
        "Status": "Active"
    },
    "New": {
        "Name": "Kanochi",
        "EN_Name": "Mahoro Kano",
        "JP_Name": "鹿乃",
        "Twitter": {
            "Twitter_Fanart": "#まほろ絵",
            "Twitter_Lewd": "",
            "Twitter_Username": "bambi2525"
        },
        "Youtube": {
            "Youtube_ID": "UCfuz6xYbYFGsWWBi3SpJI1w"
        },
        "BiliBili": {
            "BiliBili_Fanart": "鹿乃絵",
            "BiliBili_ID": 316381099,
            "BiliRoom_ID": 15152878
        },
        "Twitch": null,
        "Region": "JP",
        "Fanbase": "",
        "Status": "Active"
    }
}

@futag
Copy link
Collaborator Author

futag commented Jul 21, 2022

for add, don't include status

@JustHumanz
Copy link
Owner

ah yeah,sure

@futag
Copy link
Collaborator Author

futag commented Jul 21, 2022

for add only active members

@JustHumanz
Copy link
Owner

Webhook already deployed

Add vtuber request

Edit vtuber request

@futag
Copy link
Collaborator Author

futag commented Aug 1, 2022

Add additional do adding and change group/agency (like members)

{
  "GroupName": "a Agency",
  "Icon_URL": "https://example.jp/icon.png", // For Download and add to storage
  "GroupChannel": {
    "Youtube": [
      {
        "Youtube_ID": "UCfuz6xYbYFGsWWBi3SpJI1w",
         "Region": "EN",
      }
    ],
   "BiliBili": null
  }
}

and adding Group filed inside member webhooks (using group name or group id)

  "Name": "Kanochi",
  "EN_Name": "Mahoro Kano",
  "JP_Name": "鹿乃",
  "Group": "Independent",

or

  "Name": "Kanochi",
  "EN_Name": "Mahoro Kano",
  "JP_Name": "鹿乃",
  "Group": 10,

@JustHumanz
Copy link
Owner

Add & Change for group agency already added,
example json :

{
	"GroupName": "ArkNET",
	"GroupIcon": "https://cdn.humanz.moe/ArkNet.png",
	"GroupChannel": {
		"Youtube": null,
		"BiliBili": null
	},
	"Members": [
		{
			"Name": "Enji_NC",
			"EN_Name": "Enji Notokunchoro",
			"JP_Name": "",
			"Twitter": {
				"Twitter_Fanart": "#Enji_Art",
				"Twitter_Lewd": "",
				"Twitter_Username": "Enji_NC"
			},
			"Youtube": {
				"Yt_ID": "UCoKQhFQUtg6H09u6fHFN1AA"
			},
			"BiliBili": null,
			"Twitch": null,
			"Region": "ID",
			"Fanbase": "",
			"Status": "Active"
		}
	]
}

When adding agency group the member data can't be null, member data should be filled

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants