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

Add more examples of API Client usage #112

Open
5 tasks
andrii-bodnar opened this issue Jan 17, 2023 · 6 comments
Open
5 tasks

Add more examples of API Client usage #112

andrii-bodnar opened this issue Jan 17, 2023 · 6 comments
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@andrii-bodnar
Copy link
Member

Currently, we have very few simple examples in the Readme and it would be great to have more examples that would include more complex workflows:

  • adding a file to the Crowdin project (add storage, add file)
  • updating a file (add storage, update or restore file)
  • build project (start to build, check build status in a loop, download project translations)
  • upload/download TM
  • upload/download Glossary

It's better to create a separate file for these examples like here.

@andrii-bodnar andrii-bodnar added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Jan 17, 2023
@ivdimova
Copy link
Contributor

Hey @andrii-bodnar, could you please provide an example of downloading a glossary? Everything else seems to work fine, but as there are not many examples, I am unsure what goes wrong with the glossary download, may be I am missing a step. The exports seem to work fine though. Thanks in advance!

@andrii-bodnar
Copy link
Member Author

Hi @ivdimova,

could you please provide the current code sample where you're trying to download a glossary?

Thanks.

@ivdimova
Copy link
Contributor

@andrii-bodnar well, it looks like the download method only requires the glossary id, so I tried to create an import and then download -
$export` = $crowdin->glossary->export( $id, 'csv' ); $downloadFile = $crowdin->glossary->download( $id );

However in the API docs the download endpoint also requires an export ID?

@andrii-bodnar
Copy link
Member Author

@ivdimova hm, the GlossaryApi:download method looks a bit outdated indeed. It should include the exportId as well.

Thanks for pointing this out. Would you like to create a PR with the fix? 🙂

@faizan1191
Copy link
Contributor

@andrii-bodnar do you want more examples of API usage in the readme of this repo as currently, we only have example of creating a directory?

@andrii-bodnar
Copy link
Member Author

@faizan1191 we can create a separate file for examples like in the JS API client - https://github.com/crowdin/crowdin-api-client-js/blob/master/EXAMPLES.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants