Skip to content

Releases: greys-tools/pkapi.js

Release 7.2.1

16 May 20:05
Compare
Choose a tag to compare

🔨 Fixes

  • Fixed a couple spots where the token wasn't sent with requests (thanks @z0w13!)

Release 7.2.0

03 May 00:24
Compare
Choose a tag to compare

🔨 Fixes

  • the SystemAutoproxySettings model is now properly exported. whoops!
  • previously, all props that were considered nullable weren't actually marked as nullable for TS users with strict mode (or strictNullChecks) on. that should be fixed now for props that you can set to null to clear on the API

feel free to open an issue or PR if we missed a couple spots with nullable props! we tried our best to follow PK's API docs but there are a few things on there that aren't documented fully 😅

Release 7.1.0

02 May 19:06
Compare
Choose a tag to compare

❗ New

  • The group model now has the system property when fetched using getGroup(), reflecting the behavior of PK's API

(This has been a thing on the API for a bit, but wasn't documented until recently)

Release 7.0.0

11 Apr 18:34
Compare
Choose a tag to compare

🔨 Fixes

  • Fixed an issue where certain nullable dates weren't treated as nullable, and thus were converted anyways (resulting in a Date with a timestamp of 0) (Fixes #7)

This is technically a breaking change for a couple reasons:

  • While the field is marked as nullable (aka potentially falsey), this was always returning something truthy, and anyone relying on this behavior will have their code broken
  • Related to the above: anyone not checking if the property is truthy may run into issues when trying to treat the object as a Date (as now it may be null)

Release 6.2.1

29 Feb 01:53
Compare
Choose a tag to compare

🔨 Fixes

  • Fetching fronters on a system with no switches no longer errors out and will instead return undefined

Release 6.2.0

11 Dec 01:15
Compare
Choose a tag to compare

❗ New

  • There are new arguments on System.getGroups():
    • with_members: set to true to fetch group members
    • raw: set to true to only receive member UUIDs, directly from the API
  • Relatedly, there are also new arguments for System.getSwitches()
    • before: set to a Date in order to fetch switches from before that time
    • limit: supply a number to limit how many switches to fetch
  • avatar_url and display_name have been added to the system guild settings object

Everything should be tested and working, but feel free to let us know if anything goes wrong!

Release 6.1.0

20 Oct 14:38
Compare
Choose a tag to compare

❗ New

You can now specify debug when creating an instance of the API! Setting it to true will log any request errors to the console; setting it to false will hide it, so you can decide for yourself what to do with any errors :)

This property is true by default in order to keep with the existing behavior, but this may change in the future

Release 6.0.0

28 Aug 23:27
Compare
Choose a tag to compare

❗ New

All elements that were missing from recent API changes have been added! These changes are:

  • Added autoproxy settings
  • Removed AP settings from the system settings object
  • Added show_private_info to system settings object
  • Added pronouns and related privacy option to system, documented color as well
  • Added a multitude of things to members:
    • proxy_privacy
    • webhook_avatar_url
    • tts
    • autoproxy_enabled
    • message_count
    • last_message_timestamp
  • Added keep_proxy to member guild settings
  • Added name_privacy and metadata_privacy to groups
  • Added guild to messages

🔁 Changes

  • Cleaned up and rearranged some properties to better fit how they come in from the API

🔨 Fixes

  • Fixed an issue where setting public or private directly for a privacy option (instead of true or false) would result in that option getting skipped

Right now we're aware of an issue with autoproxy settings where having autoproxy_member set to null may return status 500 errors. This is an issue with the API itself at the moment, not the library!

As always, feel free to let us know of anything we're missing or anything that isn't working :3

Release 5.1.1

11 Feb 20:12
Compare
Choose a tag to compare

🔁 Changes

Sometimes I'm a fool and forget to write variable names consistently. This update changes userAgent to user_agent to keep in line with the existing property names on the api 😅

Release 5.1.0

10 Feb 19:28
Compare
Choose a tag to compare

❗ New

The library now offers a userAgent property when setting up your client, and will send a default User-Agent header of PKAPI.js/<version>, starting with 5.x! You can supply your own user agent in the API options when setting up your client, or supply it later on if desired. This change has already been pushed to npm and should be available now!