Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adds personio_v2 provider #3089

Merged

Conversation

tonibardina
Copy link
Contributor

The base url for the Personio provider was including the v1 path so I was not able to make calls to the the v2 of the api. To not break it for the current users I have followed the same approach that you have used with the twitter api and decided to create the provider for the api v2 version.

@tonibardina tonibardina changed the title Adds personio v2 provider feat/adds_personio_v2_provider Nov 30, 2024
@tonibardina tonibardina changed the title feat/adds_personio_v2_provider feat: Adds personio_v2 provider Nov 30, 2024
Copy link
Collaborator

@bodinsamuel bodinsamuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for you contribution 🙏🏻
I think we need to determine the best strategy around this issue

packages/shared/providers.yaml Show resolved Hide resolved
sidebarTitle: Personio (v2)
---

API configurations: [`personio`](https://nango.dev/providers.yaml)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove this page and just add personio-v2 in personio.mdx

Copy link
Contributor Author

@tonibardina tonibardina Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @bodinsamuel I just wonder if we can merge both since they are slightly different:

personio:
    display_name: Personio
    categories:
        - hr
    auth_mode: OAUTH2_CC
    proxy:
        base_url: https://api.personio.de/v1
        headers:
            x-personio-partner-id: ${connectionConfig.partnerId}
            x-personio-app-id: ${connectionConfig.appId}
    token_url: https://api.personio.de/v1/auth
    body_format: json
    docs: https://docs.nango.dev/integrations/all/personio
    connection_config:
        partnerId:
            type: string
            title: Partner ID
            description: The partner ID of your Personio account
        appId:
            type: string
            title: App ID
            description: The app ID of your Personio account

personio-v2:
    display_name: Personio (v2)
    categories:
        - hr
    auth_mode: OAUTH2_CC
    proxy:
        base_url: https://api.personio.de/v2
        headers:
            Content-Type: application/x-www-form-urlencoded
    token_url: https://api.personio.de/v2/auth/token
    scope_separator: ' '
    docs: https://docs.nango.dev/integrations/all/personio
    token_params:
        grant_type: client_credentials

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Maybe we should create a v2 section in the same doc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any example of an integration where multiple versions are explained so I can make sure we are being consistent on how things are shown?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We never did it so I guess something simple like

## API v2
[... requirements]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @bodinsamuel actually there were no big differences between both versions from the nango perspective. What I have done is adding a Api V1 tag to the requirements that are specific for that version

@bodinsamuel bodinsamuel enabled auto-merge (squash) December 2, 2024 16:23
@bodinsamuel bodinsamuel merged commit 5a224b6 into NangoHQ:master Dec 2, 2024
18 of 20 checks passed
hassan254-prog pushed a commit that referenced this pull request Dec 3, 2024
<!-- Describe the problem and your solution --> 
The base url for the `Personio` provider was including the `v1` path so
I was not able to make calls to the the `v2` of the api. To not break it
for the current users I have followed the same approach that you have
used with the twitter api and decided to create the provider for the api
`v2` version.

---------

Co-authored-by: Samuel Bodin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants