at-gmbh / personio-py

a lightweight Personio API client
https://at-gmbh.github.io/personio-py
Apache License 2.0
26 stars 17 forks source link

Custom Fields availability #21

Closed b-A-shi closed 3 years ago

b-A-shi commented 3 years ago

Hey, first of all thank you for this Libary it helps me a lot in my Daily work.

I want to ask if there is a possibility to receive Custom fields from Personio via the Library? There are around 10 different fields in our Personio which i cant access right now.

I thought about a function in the Library to add them by myself cause these fields different from instance to instance.

klamann commented 3 years ago

sure, you can access custom fields with personio-py. They can all be found under the dynamic_raw property of your Employee objects.

If your custom fields are not in this dictionary, maybe you need to configure access to those fields in the Personio settings.

You can also define a mapping for custom fields that have other types than strings using the DynamicMapping class. There is an example in the test cases.

I should really update the user guide to explain this kind of stuff :D

b-A-shi commented 3 years ago

got it, thank you! I would love to see an update on the User guide :D