Releases: greys-tools/pkapi.js
Release 7.2.1
Release 7.2.0
🔨 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 tonull
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
❗ New
- The group model now has the
system
property when fetched usinggetGroup()
, 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
🔨 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
🔨 Fixes
- Fetching fronters on a system with no switches no longer errors out and will instead return
undefined
Release 6.2.0
❗ New
- There are new arguments on
System.getGroups()
:with_members
: set totrue
to fetch group membersraw
: set totrue
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 timelimit
: supply a number to limit how many switches to fetch
avatar_url
anddisplay_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
❗ 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
❗ 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, documentedcolor
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
andmetadata_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
orprivate
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
🔁 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
❗ 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!