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

Dropbox api path root support #208

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

wetmarble
Copy link

@wetmarble wetmarble commented Oct 17, 2023

Support for Dropbox-API-Path-Root header

This PR allows users to set the Dropbox-API-Path-Root header globally for the client instantiation. This allows the Dropbox object to be scoped to a team namespace instead of an individual user's namespace.

Information on Dropbox's use of namespaces can be found here: https://developers.dropbox.com/dbx-team-files-guide#namespaces

Solves issue #207

Changes

compser.json

  • Added phpunit support for versions 7 and 8
  • Added ext-json to facilitate creating a json to pass the header data

Dropbox.php

  • Added namespace_id to the config options
  • Set the namespace id of the http client

DropboxGuzzleHttpClient.php

  • Added a new protected property namespaceId of type string|null
  • Added a setNamespaceId() method which accepts string or null as it's input and sets the protected property
  • Updated send() to add a Dropbox-API-Path-Root header to the headers array if namespaceId is set

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.

None yet

1 participant