All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.All notable changes to this project will be documented in this file.
0.3.1 - 2024-07-25
-
ujson
is no longer supported. -
Client.run
, useasyncio.run
instead.
- The method
search_entnties
is currently marked asunstable
until Bungie fixes it. - Support
aiohttp
3.10.5 compatibility
0.3.0 - 2024-07-25
fetch_sanitized_membership
, available on both client APIssearch_groups
, available on both client APIsRESTClient.report_player
RESTClient.force_drops_repair
RESTClient.claim_partner_offer
RESTClient.fetch_bungie_rewards_for_user
RESTClient.fetch_bungie_rewards_for_platform
RESTClient.fetch_bungie_rewards
Image.stream
Image.chunks
FireteamFinder
methods, available through theRESTClient.build_fireteam_finder
method.
- implemented the
CHARACTER LOADOUTS
component along with its framework methods, You can access it viaComponents.character_loadouts
after fetching a profile. orloadouts
after fetching a character. - implemented the
SOCIAL COMMENDATIONS
components, you can access it viaComponents.commendations
after fetching a profile.
type
,profile_ban_expire
andegs_name
fields toBungieUser
code
field toPartialBungieUser
origin
field toApplication
emblem_color
field toCharacter
minutes_played_this_session
field toCharacter
percent_to_next_level
field toCharacter
- Added the following to
Profile
season_hashes
versions_owned
season_hash
guardian_rank
highest_guardian_rank
renewed_guardian_rank
event_card_hashes
user
, removedname
,id
andtype
in favor of this.
- Added
available_activity_interactables
toCharacterActivity
sain
as a required dependency. this is used mainly to replaceiterators
custom_client
exampleGameVersions
enum.- An option to use a specific executor for downloading the manifest and
Image.save
method.
import concurrent.futures
# Use process pool executor to write the manifest data.
await rest.download_json_manifest(
...,
executor=concurrent.futures.ProcessPoolExecutor()
)
FireteamBuilder
inaiobungie.builders
interfaces
dir is renamed toapi
.factory
renamed toframework
and exported to top level, no longer aninternal
packagefactory.Factory
is nowframework.Framework
.interfaces.RESTInterface
renamed toapi.RESTClient
which matchesrest.RESTClient
.interfaces.FactoryInterface
renamed toapi.Framework
which matchesframework.Framework
.- trait
Netrunner
renamed toSend
and is no longer used, currently kept for future plans. - trait
Serializable
renamed toDeserialize
and its methodfactory
renamed toframework
. - trait
ClientApp
renamed toCompact
. Client.factory
is nowClient.framework
.factory.EmptyFactory
is nowframework.Empty
and is now deprecated, useFramework()
instead.UserLike
abstract class renamed toUnique
.deserialize_app
renamed todeserialize_application
.deserialize_app_owner
renamed todeserialize_application_member
ApplicationOwner
is nowApplicationMember
and the user fields are accessible through.user
Application.owner
field is nowApplication.team
which returns the entire application roaster instead of just the owner.Framework.deserialize_fireteam_destiny_users
renamed todeserialize_fireteam_destiny_membership
FireteamMember.destiny_user
renamed toFireteamMember.membership
Image.default_or_else
is now justImage.default
Framework
doesn't require anet
parameter anymore.Client.run
is deprecated and will be removed in the next major release.RESTClient.with_debug
has been moved totraits.RESTful
with a default final impl.internal.assets
which containedImage
has been moved toaiobungie.builders
Image
now acceptsNone
as a default path.sain
package is now used as the default iterator builder. it is a dependency free that's developed by me so it won't really have any side-effects.- If you're a
RESTPool
user, it is possible to callbuild_oauth2_url
without acquiring a client instance this is a good change for performance improvements since acquiring a client instance also means opening a TCP connection, which is useless when you're still not making any requests.
pool = aiobungie.RESTPool("token", client_id=0000, client_secret="secret")
url = pool.build_oauth2_url()
# same as
async with pool.acquire() as client:
url = client.build_oauth2_url()
# also the same
url = pool.acquire().build_oauth2_url()
The following methods were scheduled to be removed in this version.
PartialBungieUser.fetch_self()
ProfileItemImpl.is_transferable
ProfileItemImpl.collect_characters
ProfileItemImpl.fetch_self
DestinyMembership.fetch_self_profile
QuesStatus.fetch_quest
QuestStatus.fetch_step
Objective.fetch_self
ItemsComponent.any
ItemsComponent.all
Challenges.fetch_objective
Rewards.fetch_self
Activity.is_solo
Activity.is_flawless
Activity.is_solo_flawless
Activity.fetch_post
Character.transfer_item
Character.equip_item
Character.equip_items
Character.pull_item
Character.fetch_activities
RenderedData.fetch_my_items
MinimalEquipments.fetch_my_item
AvailableActivity.fetch_self
ClanMember.ban
ClanMember.unban
ClanMember.kick
ClanMember.fetch_clan
GroupMember.fetch_self_clan
Clan.deny_pending_members
Clan.approve_pending_members
Clan.add_optional_conversations
Clan.fetch_banned_members
Clan.fetch_pending_members
Clan.fetch_invited_members
Clan.fetch_conversations
Clan.fetch_available_fireteams
Clan.fetch_fireteams
Clan.fetch_members
Clan.edit
Clan.edit_options
ClanConversation.edit
CraftablesComponent.fetch_craftables
SearchableEntity.fetch_self_item
these methods above are still accessible via the both clients, either the RESTClient
or Client
,
their abstraction on the object just got removed not that actual implementation of the method.
ok but how do i reproduce those?
client = aiobungie.Client("...")
async def character_transfer_item() -> None:
# Instead of: await character.transfer_item(...)
# call it from the client directly.
await client.rest.transfer_item(token, char_id, item_id)
async def character_fetch_activities() -> None:
# Instead of: await character.fetch_activities(...)
# call it from the client directly.
await client.fetch_activities(cid, mid, mode, ...)
ok but why? there're multiple reasons why those got removed.
good practices; at the beginning, those methods were meant to provide a higher-level abstraction over the object itself, so you can call them directly from the object, while it is a nice QoL thing, it can, if misused, end up with worse overall code. this change should forward users with developing good code and practices and make them more aware of both client APIs.
conflict and unsafety; since those methods can also be accessed via an empty deserializer results, this introduces bugs for the user of this lib,
Example:
framework = aiobungie.framework.Empty()
response = requests.get(...)
user_object = framework.deserialize_user(response.json())
# this is undefined behavior, since an empty deserializer doesn't have a client associated with it.
await user_object.fetch_self()
aiobungie crates are meant to be a stand-alone representation of the fetched API results. which payloads deserializes into. so those methods won't really fit in.
.net
field removed from all objects.UserLike.icon
UserLike.last_seen_name
UserLike.is_public
ComponentFields
enumImage.url
, useImage.create_url
instead.iterators
package in favor ofsain
- deserializing
Friend
object was raisingKeyError
due toname
field. vault
option in methodpull_item
now works as intended, thanks to #418 for opening the issue.ComponentType.CHARACTER_PROGRESSIONS
enum field name typo fixed.
0.2.11 - 2024-02-05
Iterator.by_ref
method.- Installing option
full
by callingpip install aiobungie[full]
.
traits.Debug
trait.- The alias
crate
forcrates
is removed. Useaiobungie.crates
instead. rest.RequestMethod
enum.
- Object immutability, all objects are now frozen.
- All sequences are now built as tuples instead of list, This helps reducing the size of the allocated bytes and increases the speed by a little bit since tuples are sized and lists are dynamic, This obviously depends on how large the data that has been fetched. But in general tuples are faster.
- Logging an
Iterator
object now doesn't consume the data. set_item_lock_state
is currently unstable due to Bungie returning HTML.ClanMember.current_user_memberships
is now nullable.- Optimized factory deserialization methods.
- The
enable_debugging
parameter renamed todebug
. - You won't need to pass
True
when callingRESTClient.enable_debug
. - You'll be getting deprecation warning on
crates
level helper methods. RESTClient.enable_debug
renamed toRESTClient.with_debug
method.
0.2.10 - 2023-12-12
- Fixed
fetch_oauth2_tokens
andrefresh_access_token
raisingBadRequest
. client_secret
was being logged in the headers when enablingTRACE
log level.
0.2.9 - 2023-12-1
- Optimized converting ISO8661 date strings to datetime, date-util package has been dropped and the converting process has been implemented directly using stdlib datetime.
orjson
is a faster replacement for the JSON lib, If found installed, it will be used as the default JSON encode/decoder.ruff
is now used as the default formatter. This is rather an internal change and shouldn't affect users.
- Added more examples.
- Lightfall loadouts methods to the
RESTClient
.equip_loadout
clear_loadout
snapshot_loadout
update_loadout
CHARACTER_LOADOUTS
components type enum field.- If your Python version is
3.10
, A backport ofdatetime.fromisoformat
module will be installed. This is required due to this specific Python version not able to parse some ISO date formats. aiobungie.EmptyFactory
object. See the object docs for more info.Iterator.last()
method which return the last item in the iterator.
- Python 3.10 and above is now supported, 3.9.0 is no longer supported.
download_manifest
method has been renamed todownload_sqlite_manifest
- Method
fetch_player
renamed tofetch_membership
. User.destiny
renamed toUser.memberships
,ClanMember.bungie
toClanMember.bungie_user
,LinkedProfile.bungie
toLinkedProfile.bungie_user
for naming consistency.- Both download manifest methods now return
pathlib.Path
object. - All arguments in the client constructors now required to be passed as a kwarg besides the token.
- Refactor examples code.
Factory
methods that used to returnOptional[T]
now returns justT
.Enum.__int__
andFlag.__int__
doesn't check the instance of the type anymore.iterators.into_iter
function renamed toiterators.iter
.- Use new
str | None
union instead ofOptional[str, None]
- Improved documentations on objects.
- Some object field names has been typo fixed.
- Method
fetch_available_fireteams
typo name fixed. Character.total_played_time
now returns the total time in seconds instead of string.- Fields
emblem
,emblem_icon
andemblem_hash
are now Optional.
- The
net
field has been removed from some objects. - The
UNDEFINED
object, Fields now returnT or None
instead.
- Fixed multiple bugged
Factory
methods. Factory.deserialize_character
was raisingKeyError
when accessing the emblem keys, Thanks to @spacez320 (#303)
0.2.8 1-24-2023
-
You can no longer pass
rest_client
instance toClient
object. -
Friend
object methods has been removed since they can be performed using theRESTClient
, Includingaccept
->rest.accept_friend_request
decline
->rest.decline_friend_request
remove
->rest.remove_friend
remove_request
->rest.remove_friend_request
-
The
_info.py
package is renamed tometadata.py
. -
Updated requirements versions.
- New method added to
MembershipTypeError
exceptioninto_membership
which converts the membership from str toMembershipType
enum.
- Parameter
max_ratelimit_retries
removed from client impls.
0.2.7 10-08-2022
- Base
Client
users now will need to open the REST client before making any requests.
The old way.
import aiobungie
# Here the client will initialize the TCP connector even though
# we're still not planning on making any request which's not performant.
client = aiobungie.Client('...')
results = await client.fetch('...')
The new way
client = aiobungie.Client('...')
# Open the REST connection and use the client normally.
async with client.rest:
users = await client.search_users('...')
return users[0]
# Another way of doing that manually
# This must be called within an event loop
client.rest.open()
# Do stuff with the client...
# Close.
await client.rest.close()
build_oauth2_url
now returnsbuilders.OAuthURL
object instead of a string URL, This is intentionally changed to seperate the state field from the URL. A fully generated URL can still be acquired via.compile()
method or.url
property.
-
Special method
__or__
toFlatIterator
which allows to union two iterators togather asx = iterator1 | iterator2
-
New method FlatIterator.
async_for_each
, whichs equavilant tofor_each
but takes an async function instead. -
Allow to customize where to download the manifest file.
Example:
await client.download_manifest(name='Destiny', path='G:/Files' or pathlib.Path("Path/**/**")) # -> G:/Files/Destiny.sqlite3
- Enum fields
EPIC_GAMES_STORE
andDEMON
. #214
-
FlatIterator
no longer support async iteration. -
Removed method
FlatIterator.discard
in favor ofFlatIterator.filter
mathod. -
FlatIterator
class renamed toIterator
. -
Enum flags now uses bitwise
<<
for its fields instead of=
numbers assign.
CharacterError
exception. This was supposed to be removed with0.2.6
.
- Docs colors.
-
Debug
trait. -
Seson 17 new activities.
-
Internal methods names has changed.
-
Rift, Lostsector, Zonecontrol and Iron Banner Rift enum gamemode fields.
-
Optimized object deserialization proccess.
-
helpers.awaits
now returnsSequence
instead ofCollection
. -
RESPool
No longer sets the metadata after acquiring new instance everytime. The pool'smetadata
must be used now. -
Some of
PostActivityPlayer
fields changed to optional due to Bungie not including them in payloads. -
_deserialize_post_activity
is now exposed in the interface for self use.
-
helpers.just
function. -
Useless ABCs.
-
Guardian Games fireteam activity.
- Thanks to @xhl6666, A bug has been Fixed (#193) where using
fetch_post_activity
raisedKeyError
in some cases.
0.2.6a3 2022-05-8
-
New
builders.py
contains results of received/sent objects to the API. -
RESTPool
impl.
-
REST_DEBUG
level name toTRACE
-
enable_logging
parameter now acceptsstr | int | bool
. -
Setting the level to
True
now will only log minimal information. -
PlugSocketBuilder
andOAuth2Response
has been moved tobuilders.py
and both objects are not exposed to the project namespace anymore. Howeveraiobungie.builders.*
is exposed. -
aiobungie.crate
is renamed tocrates
+ Added an alias forcrate
for backward versions. -
RESTnterface
andRESTClient
is now completlyasync def
+ typesafe.
- Objective in metrics components was always returning
None
0.2.6a2 2022-03-17
-
Ability to read and save any resource that returns an
Image
. -
Image mime types enum in assets.
-
fetch_aggregated_activity_stats method.
-
fetch_json_manifest method.
-
fetch_manifest_version method.
-
Objects no longer type hinted with
MaybeImage
and now returnImage
instead. -
Manifest methods that open files are non-blocking now.
-
connect_manifest is now deprecated and scheduled for removal in 0.2.6.
-
fetch_manifest_path now return all JSON object paths instead of the SQLite one.
-
download_manifest now takes a
force
parameter to force downloading the manifest. -
ABC class
Entity
is renamed toEntityBase
andBaseEntity
is nowEntity
. -
property
index
has been removed fromEntityBase
to allowSearchableEntity
inherit from it.
- MaybeImage type hint.
- FlatIterator.sort wasn't sorting right.
0.2.6a1 2022-03-05
-
All methods that used to take
*components
now take a list of component types instead. -
All components should be passed as is without unpacking nor using the
.value
attribute. -
The
auth
parameter is now exposed as an actual parameter and not a kwarg.
Example
await client.fetch_profile(
...,
components=[aiobungie.ComponentType.ALL_PROFILES, aiobungie.ComponentType.CHARACTERS, ...],
auth="..."
)
-
Included all activities in
FireteamActivity
. -
Standard
FlatIterator
andinto_iter
ininternal.iterators
and exported to the project's namespace.
Example usage
import aiobungie
client = aiobungie.Client()
friends = await client.fetch_friends(...)
# This can either be used with `async for` or `for`
async for friend in (
aiobungie.into_iter(friends) # Transform the sequence into a flat iterator.
.filter(lambda friend: friend.type is MembershipType.STEAM) # Filter to only steam friends.
.take(5) # Limit the results to 5 friends
.discard(lambda friend: friend.online_status is Presence.ONLINE) # Drop friends that are not online.
.reversed() # Reverse them.
):
print(friend.unique_name)
-
Parameter
memberid
infetch_profile
is nowmembership_id
. -
Methods that now return a
FlatIterator
instead of a standard sequence.- fetch_activities
- search_users
- fetch_clan_admins
- fetch_clan_members
- search_entities
KeyError
was being thrown when deserializingfireteam_activities
.
- Method
helpers.collect
.
0.2.6a0 2022-02-26
-
RESTClient
now takes an extra parameterenable_debugging
, If set toTrue
then it will debug responses and log them. -
RESTClient.enable_debugging
method which does the same thing as above. -
A better looking headers logging.
-
A unique trace logging level
rest.REST_DEBUG
which will be used as the main logging level for REST debugging. -
destination_hash
andactivity_hash
fields toObjective
. -
Flag
enumeration.
-
Implemented The Witch Queen API update changes
OFFSNSIVE
Game field to enumGameMode
.CRAFTABLES
enum field toComponentType
.- New
CraftablesComponent
which's returned when fetching a profile with the craftables component, This is accessed byComponent.character_craftables
. - Added
entity.ObjectiveUIStyle
enum. ui_label
andui_style
fields toObjectiveEntity
.LEVEL_AND_REWARD
field toValueUIStyle
enum.CraftableItem
andCraftableSocket
andCraftableSocketPlug
objects.
-
InventoryEntity.tier_type
now returnsTierType
instead ofint
. -
TierType
enum. -
helpers.unimplemented
methods which marks methods and classes as unimplemented. -
Improve documentation for
traits.py
. -
traits.ClientBase
name changed toClientApp
. -
Methods that used to raise
NotImplementedError
no only warns. -
Improve
helpers.deprecated
method. -
CraftablesComponent.craftables
now return an optionalCraftableItem
if it returns null. -
MetricsComponent.metrics
's objective now returnNone
it returns null. -
Objective.progress
is not optional.
IntEnum
since now its independently used with builtinint
.
-
enum field
GreenPips
wasn't incluede inValueUIStyle
which was raisingValueError
#123 -
Fix a bug where
ApplicationOwner__str__()
was raisingRecursionError
. -
Fixes an error where
error.raise_error
wasn't being called when getting a non JSON response AKAtext/**
. See #143
0.2.5 2022-02-02
This is 0.2.5
stable release and all alpha/beta releases falls under this.
These changes are considered part of 0.2.5
.
-
user.SearchableDestinyUser
. -
More profile and characters components.
-
factory.Factory
andassets.Image
are now exported to top level. -
Almost 95% of the API endpoints has been added.
-
__int__
method toUndefinedType
which returns a literal0
-
KeyError
s was being raised during deserialization payloads.
-
DestinyUser
has been renamed toDestinyMembership
. -
InternalServerError
is now raised when the API is down instead ofOSError
. -
Factory methods name changes for consistency.
deserialize_destiny_user
->*_destiny_membership
.deserialize_destiny_members
->*_destiny_memberships
deserialize_found_users
->*_searched_user
and no longer returns a sequence.
-
Client.search_users
now returnsSequence[SearchableDestinyUser]
Client.search_users
was raising errors due to deserializing.
0.2.5b14 2022-1-13
-
fetch_unique_weapon_history
method. -
Assists fields to
activity.ExtendedWeaponValues
-
joine_date
field toclans.ClanAdmin
-
Logging time takes between each request.
-
Implmented
transitory
profile component along with its objects infireteams.py
. -
You can now store data using
client.metadata
property from either rest or base client which can be used globally. -
Added a profile_link property to
BungieUser
which returns their profile link. -
Implemented
components.ItemComponent
. -
new
items.py
module includes all item related objects. -
enums.ItemSubType
for subtype inventory items. -
ClanMember.member_type
field. -
ClanMember.is_admin
andis_founder
fields. -
Clan.progression
and some extra other fields toclans.Clan
. -
fetch_clan_weekly_rewards
method. -
fetch_clan
andfetch_clan_from_id
now can takeaccess_token
parameter for authorized user requests.
-
Friend.is_pending
method since this can be checked usingFriend.relationship
. -
Friend.pending
method since this can be checked usingClient.fetch_friend_requests
. -
Friend.add
method since this can be used viaRESTClient.send_friend_request
-
helpers.AsyncIterator
has been removed. -
clans.ClanOwner
in-favor ofclans.ClanMember
. -
fetch_member
, usefetch_members(name="...")
instead.
-
Significantly optimized factory's checkings and deserializing.
-
Client.fetch_groups_for_member
now returns a sequence instead of a signle object. This also referencesfetch_potentional_groups_forr_member
. -
Only non-abcs and non-enums classes are exported to
__all__
incrate.__init__.py
-
access_token
parameter is now always positional on all methods. -
enum
Item
name changed toItemType
. -
enum
DamageType
now holds the actual enum values instead of the hashes. -
All crate fields are now relaxed. Which have the field name and type only.
-
All objects that inherits from
user.UserLike
.object.__str__()
andstr(object)
will now return the full unique name for that object. -
LinkedProfile
no longer supportsasync for
. -
InventoryEntity.sub_type
now returnsenums.ItemSubType
instead ofenums.ItemType
. -
Some parameters are now positional.
-
Client.fetch_clan_members
now acceptsname
parameter. -
Client.fetch_clan_admins
now returns a sequence ofClanMember
instead ofClanAdmin
. -
ClanMember.bungie
is now an optional field. -
Clan.fetch_my_fireteams
method renamed tofetch_fireteams
. -
ClanMember
now inherits fromuser.DesinyUser
for no field duplications. -
Name Changes for consistensy
fetch_user
method renamed tofetch_bungie_user
.fetch_hard_linked
method renamed tofetch_hardlinked_credentials
.fetch_app
method renamed tofetch_application
.fetch_own_bungie_user
renamed tofetch_current_user_memberships
.
-
More methods has been added to
RESTClient
.
-
Character.last_played
wasn't returning a datetime object. -
is_online
,last_online
,joined_at
andgroup_id
fields now correctly returned forClanMember
0.2.5b13 2021-12-24
-
BadRequest
exception. -
Character.transfer_item
andCharacter.pull_item
now takes missingvault
option. -
Character.fetch_activities
method. -
Finished implementing post activities methods.
-
is_flawless
,is_solo
andis_solo_flawless
useful properties to for bothActivity
andPostActivity
. -
Post activity extended values and player weapons values.
-
rest._handle_error
method moved toerror.py
and renamed toraise_error
-
rest.OAuth2Response
class returned for OAuth2 responses. -
RESTClient.client_id
property. -
RESTClient.collect_components
is now protected for the class. -
RESTClient.build_oauth2_url
method to build an OAuth2 URL. -
RESTClient.fetch_oauth2_tokens
andRESTClient.refresh_access_token
new methods. -
Missing
entity.InventoryEntity
fields were added. -
fetch_user_credentials
method. -
insert_socket_plug
andinsert_socket_plug_free
methods. -
rest.PlugSocketBuilder
to build socket plugs. -
set_item_lock_state
andset_quest_lock_state
methods. -
search_entities
method. -
OAuth2 example.
-
Manifest example.
-
download_manifest
,connect_manifest
REST methods.
-
Python 3.8 is now dropped, Python 3.9 and above are supported.
-
collections.abc
is now used for all type hints excludingtyping.Union[]
andtyping.Opional[]
. -
typedefs.JsonObject
andJsonArray
uses uppercaseJSON
. -
Exceptions now has fields and improved.
-
fetch_activity
function name changed tofetch_activities
-
fetch_activities
now returns a sequence(collections.Sequence[Activity]
) of activities instead of a singular activity object. -
ActivityVaules.team
returnstyping.Optional[int]
now instead ofint
. -
Exported
aiobungie.url
toaiobungie.__init__.py
-
Client
andRESTClient
now take 2 extra optional parameters,client_secret
andclient_id
for OAuth2 usage. -
traits.Serializeable.serialize
property name changed tofactory
. -
static_request
now only takes a str for the route. -
All manifest methods are accessed through the RESTClient.
-
fetch_manifest
method renamed toread_manifest_bytes
.
-
Fields from
enums.Item
since they don't belong to there. -
web_app example.
-
Client.fetch_manifest
method. -
Manifest object
0.2.5b12 2021-12-10
-
Implemented Bungie profile components.
not all of them
. -
crate.records
which implements Bungie record component. -
__repr__
overloaded forenums.Enum
which just returnsenums.Enum.__str__
. -
Profile.collect_characters()
method which fetch and collect all profile characters at once. -
Implemented
aiobungie.crate.fireteams
objects and its methods. -
RESTClient._request
method now takes and extraauth
parameter for requests that requiresOAuth
header. -
The base client now takes an extra
rest_client
parameter for aRESTClient
instance provided by the user. This is optional and not required. -
Chinese attributes to
fireteams.FireteamLanguage
-
An API interface/abc and docs to the
factory.Factory
deserialazation factory class. This is optional and not required. -
A new helper function
helpers.collect()
which collect multiple arguments, join them and separate them. -
Missing
ComponentType
enum fields were added. -
Implemented
profile.ProfileProgression
profile component. -
profile.ProfileItemImpl
class implements profile components that returns items. i.e.,profileinventories
,profilecurrencies
, etc. -
More enums for Destiny 2 items.
-
entity.BaseEntity
class which all entities now inherit from. -
fetch_objective_entity()
method which returnsentity.ObjetiveEntity
entity. -
enums.ComponentType
now has fieldsALL_X
which includes all component fields for a specific component. -
Implemented new Activities classes and entities in
crate.activity
.
-
Profile.collect
method renamed tocollect_characters
for consistency. -
fetch_profile
and all alternative methods now takes**options
kwargs which expectsauth
argument-fetch_profile
and all alternative methods now takes*components
parameter which accept multiple components to be passed and retuned at once. -
fetch_profile
now returnscomponents.Component
instead ofprofile.Profile
. -
fetch_character
now returnscomponents.CharacterComponent
instead ofcharacter.Character
. -
fetch_character
no longer takes a char_type(aiobungie.Class
) parameter and takescharacter_id
which returns the character by its id instead of type. -
fetch_character
and all alternative methods now takes*components
parameter which accept multiple components to be passed and retuned at once and**options
kwargs which expectsauth="BEARER_TOKEN"
argument for components that requires a bearer access token. -
aiobungie.Component
enum name renamed toComponentType
. -
traits.py
moved to the root directory instead of being inhelpers
-
All type hints used to be in
helpers.py
moved to new moduletypedefs.py
in root directory. -
undefined
types are now inundefined.py
new module. -
profile.ProfileComponent
ABC has been removed in favor ofprofile.Profile
. -
Client.serialize
property name changed toClient.factory
. -
Client.fetch_public_milestone_content
method now returnsMilesonteContent
instead ofMilesonte
.
-
RESTClient._request
now takes a string orrest.RequestMethod
enum for the method. -
RESTClient._request
now takesyarl.URL
or a string for the path. Both changes affect `RESTClient.static_request. -
helpers.just()
now takes a generic type for the return type hint. -
helpers.py
now only include helper functions and classes. -
Simplify not found raised errors to only raise
error.NotFound
instead of other not found errors. -
Export
enums.Enum
andenums.IntEnum
toenums.__all__
. -
RESTClient
continues onRuntimeError
errors instead of raising it. -
traits.RESTful.static_request
now takes auth parameter for OAuth2 methods as well. -
fireteams
enums are finalized withtyping.final
-
Character.stats
now returns a mapping ofaiobungie.Stat
toint
of the character stats. -
crate.season.*
objects are now exposed to docs andcrate.__init__.py
-
fetch_membership()
Now requires an extra parametercode
seperatly instead ofNAME#123
profile.Profile
methodsfetch_warlock
,fetch_titan
, andfetch_hunter
has been removed since the expected character to be returned wasn't always guranteed, This method has been replaced withcollect_characters
which fetch all found characters and returns a collection of them.
You can always check for the character class type i.e.,
characters_components = await profile.collect_characters(aiobungie.ComponentType.CHARACTERS)
for component in characters_components:
# Check if the character component avilable.
# This should always be available since we passed it to the request.
if character := component.character:
if isinstance(character.class_type, aiobungie.Class.WARLOCK):
...
else:
...
- Not found errors removed and now only
error.NotFound
is raised instead.error.PlayerNotFound
error.UserNotFound
error.ActivityNotFound
error.ClanNotFound
-
Fixed
Friend.user
was returningUser
and notBungieUser
-
Some methods that required OAuth2 was buggy has been fixed.
-
The rest client was showing
unclosed client_session
erros and the end of the request. -
Friend.unique_name
wasn't returning the actual unique name. -
Factory.deserialize_friends
wasn getting the wrong payload names. -
Closing the rest client connector instead of the session.
0.2.5b11 2021-10-21
fetch_friends
andfetch_friend_requests
methods werePOST
and fixed toGET
.
0.2.5b10 2021-10-20
-
New module
milestones.py
withMilestone
,MilestoneItems
objects which implements (not fully) Bungie's Milestones. -
Added Stable Python 3.10 to the CI tests from 3.10-dev.
-
A new type hint
IntAnd[EnumSig]
to pass a param as an enum or just an int. Exampleaiobungie.Class.WARLOCK
or simply just2
. -
Let all methods that used to only takes an enum also supports an int.
-
Added _backoff.py for/and Handling ratelimiting and retry after REST errors.
-
A new parameter
max_retries
toRESTClient
andClient
which lets you choose the max REST requests retries for failuare requests. -
New exception
RateLimitedError
which's raised when being ratelimited. -
Import modules under the
typing.TYPE_CHECKING
for non-runtime modules. -
Implemented methods that requires OAuth2 bearer access tokens
kick_clan_member
can be accessed either via theClient
which returns the deserialized object orRESTClient
for the JSON object.ban_clan_member
,unban_clan_member
can be accessed fromRESTClient
.edit_clan
,edit_clan_options
which edits a clan and can be accessed viaRESTClient
.equip_item
,equip_items
inRESTClient
andcharacter.Character
fetch_own_bungie_user
methods which can be accessed viaRESTClient
.deny_pending_members
,approve_pending_members
,add_optional_conversation
methods toclans.Clan
.ClanConversation.edit
method to edit the convo settings.- Implemeted
friends.Friend
methods flow +friends.FriendRequestView
object. transfer_item
,pull_item
methods.
-
enums.MembershipOption
enum for group member options. -
errors.InternalServerError
exception. -
traits.RESTful
REST client protocol for theRESTClient
.
player.py
/.Player
module / object has been removed in-replacement ofuser.DestinyUser
.
-
PRs that used to look like this
patch/...
now should look like thistask/...
instead. -
Bound the rest response signature
ResponseSigT
toJsonObject
andJsonArray
-
Clan.owner
now returnsNone
if the owner was not found instead ofUNDEFINED
. -
Separate mock tests from real tests.
-
Export
aiobungie/interfaces
andaiobungie/crates
toaiobungie/__init__.py
-
Added real client tests to ci workflow.
-
Minor changes to nox pipelines.
-
Instead of raising
error.AiobungieError
on5xx
errors.errors.InternalServerError
is not raised. -
Profile.warlock
,Profile.titan
andProfile.hunter
method names changed toProfile.fetch_hunter()
Profile.fetch_...
.
-
Errors now are correctly raised.
-
fetch_membership_from_id
wasn't convertingtype
enum parameter toint
.
0.2.5b9 2021-10-1
-
Two simple examples for both
RESTClient
andClient
inaiobungie/__init__.py
as an introduction examples. -
__anter__
and__aexit__
forRESTClient
for context management and closing the client session correctly. -
rest._Session()
object which now aquires a new aiohttp.ClientSession() for us with our settings. -
Added a simple rest example under
RESTClient
doc strings. -
Missing docs for
search_users()
method -
Missing assertions from some of the
Client
methods. -
fetch_linked_profiles()
Method andprofile.LinkedProfile()
implementation for bungie linked profiles. -
fetch_clan_banners()
Method andclans.ClanBanner
Implementation for bungie clan banners. -
Added a
__repr__
method toassets.Image()
which just returns__str__()
. -
close()
method for theRESTClient
which closes the client session correctly -
Added a new class
helpers.AsyncIterator
forasync for ... in ...
support. -
deserialize_linked_profiles()
method to deserialize linked profiles and returnsprofile.LinkedProfile()
object. -
deserialize_clan_banners()
method to deserialize clan banners and returnsclans.ClanBanner()
object. -
Ok
class which just raisesStopIteration
exception forAsyncIterator
. -
Parameters types for
__anter__
and__aexit__
methods.
-
Renamed
RESTClient._fetch()
toRESTClient._request()
. -
Switched to pdoc from pdoc3.
-
Stable release for
0.2.5
Extended from2021-09-30
to2021-10-05
. -
The rest client now aquires the session using
rest._Session
instead of usingaiohttp.ClientSession
directly. -
Changed what was inside
__all__
in__init__.py
to let pdoc know whats being included. -
Exporting all objects to
__all__
incrate/__init__.py/pyi
to let pdoc include all objects. -
Renamed
RESTClient.static_search()
tostatic_request()
and also added the request method parameter for the user to select instead of only GET methods. -
New dracula/darkmode style for the docs pages.
-
__anter__
and__aexit__
from the base client. -
from_path()
method fromClient
which can now be accessed fromClient.rest.static_request(...)
. -
**kwargs
fromClient
andRESTClient
. -
fetch_vendor_sales()
method fromClient
. -
Removed
__all__
fromaiobungie/internal
. -
Removed
__init__.pyi
fromaiobungie/internal
.
-
Fixed a bug where
Factory.deserialize_destiny_user()
was returningdisplayName
instead of the actual value if the LastSeenDisplayName was not found. -
Fixed a bug where
Factory.deserialize_clan_members()
was raisingKeyError
for members the doesn't have a Bungie membership. It returnsNone
intead now. -
Fixed the examples to match the client design.