orca icon indicating copy to clipboard operation
orca copied to clipboard

Wrap the remaining Discord Endpoints

Open lcsmuller opened this issue 4 years ago • 3 comments

There are still a couple endpoints left that Orca has yet to cover, as outlined by the Discord Roadmap.

The following files are meant for wrapping endpoints: discord-application-command.c discord-audit-log.c discord-channel.c discord-emoji.c discord-guild.c discord-interaction.c discord-invite.c discord-user.c discord-voice.c discord-webhook.c

If an endpoint requires additional parameters (JSON, Query, ...), then you will need to generate a special struct for holding those parameters, for that purpose please refer to Orca Specs to learn how to write specs for generating the structure.

Once an endpoint has been wrapped, make sure to have its function definition added to discord.h. It should be placed in the same listing order as Discord Roadmap, and should be properly documented with doxygen syntax (again, use the surrounding code as a guide).

lcsmuller avatar Oct 04 '21 15:10 lcsmuller

What exactly is meant by wrapping? The discord roadmap has application-commands, audit-log, etc. all checked. Is there anything missing on the internal structures?

Animeshz avatar Oct 06 '21 03:10 Animeshz

@Animeshz

What exactly is meant by wrapping?

Sorry for the ambiguity, it means wrapping Discord API's documented endpoints into functions, here's an example:

  • Discord's documented endpoint to get an user object by his ID: Get User
  • Our function wrapping: https://github.com/cee-studio/orca/blob/master/discord-user.c#L30-L51

The discord roadmap has application-commands, audit-log, etc. all checked.

Yes, while the majority are covered there are still some still left unchecked, you can check under:

Is there anything missing on the internal structures?

~~Yes there is, for instance both Sticker and Stage Instance are missing their respective structures, and if an endpoint requires additional parameters we will also need to generate a structure for those. This is more complicated, and unfortunately not very well-documented at the moment but we generate all of the API-specific structures by writing our own Orca Specs.~~ No, all internal structures have been covered as of #713

In case you want to help here are the most straightforward endpoints to cover, as those require no additional structure generation:

lcsmuller avatar Oct 06 '21 17:10 lcsmuller

I have taken care of Get Guild Invites at this pull request..

tarbomb avatar Oct 17 '21 16:10 tarbomb