Skip to content

Commit

Permalink
Merge pull request #29 from lokalise/remove_file
Browse files Browse the repository at this point in the history
Remove files endpoint
  • Loading branch information
bodrovis authored Jul 28, 2022
2 parents 0a88e04 + 5680499 commit e41f188
Show file tree
Hide file tree
Showing 38 changed files with 238 additions and 214 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BSD 3 Clause

Copyright 2021 Lokalise Group, Ilya Bodrov
Copyright 2021 Lokalise Group, Ilya Krukowski

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ Brief API reference is also available at [hexdocs.pm](https://hexdocs.pm/elixir_

Licensed under the [BSD 3 Clause license](./LICENSE.md).

Copyright (c) 2021 Lokalise team and [Ilya Bodrov](http://bodrovis.tech)
Copyright (c) 2022 Lokalise group and [Ilya Krukowski](http://bodrovis.tech)
2 changes: 1 addition & 1 deletion docs/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gem 'minima', '~> 2.0'

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem 'github-pages', '~> 223', group: :jekyll_plugins
gem 'github-pages', '~> 227', group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
Expand Down
97 changes: 38 additions & 59 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (6.0.4.6)
activesupport (6.0.5.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
Expand All @@ -14,9 +14,8 @@ GEM
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.17.13)
ruby-enum (~> 0.5)
concurrent-ruby (1.1.9)
commonmarker (0.23.5)
concurrent-ruby (1.1.10)
dnsruby (1.61.9)
simpleidn (~> 0.1)
em-websocket (0.5.3)
Expand All @@ -27,39 +26,21 @@ GEM
eventmachine (1.2.7)
eventmachine (1.2.7-x64-mingw32)
execjs (2.8.1)
faraday (1.10.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
faraday (2.4.0)
faraday-net_http (~> 2.0)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.3)
multipart-post (>= 1.2, < 3)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday-net_http (2.1.0)
ffi (1.15.5)
ffi (1.15.5-x64-mingw-ucrt)
ffi (1.15.5-x64-mingw32)
forwardable-extended (2.6.0)
gemoji (3.0.1)
github-pages (223)
github-pages (227)
github-pages-health-check (= 1.17.9)
jekyll (= 3.9.0)
jekyll (= 3.9.2)
jekyll-avatar (= 0.7.0)
jekyll-coffeescript (= 1.1.1)
jekyll-commonmark-ghpages (= 0.1.6)
jekyll-commonmark-ghpages (= 0.2.0)
jekyll-default-layout (= 0.1.4)
jekyll-feed (= 0.15.1)
jekyll-gist (= 1.5.0)
Expand All @@ -73,7 +54,7 @@ GEM
jekyll-relative-links (= 0.6.1)
jekyll-remote-theme (= 0.4.3)
jekyll-sass-converter (= 1.5.2)
jekyll-seo-tag (= 2.7.1)
jekyll-seo-tag (= 2.8.0)
jekyll-sitemap (= 1.4.0)
jekyll-swiss (= 1.0.0)
jekyll-theme-architect (= 0.2.0)
Expand All @@ -91,12 +72,12 @@ GEM
jekyll-theme-time-machine (= 0.2.0)
jekyll-titles-from-headings (= 0.5.3)
jemoji (= 0.12.0)
kramdown (= 2.3.1)
kramdown (= 2.3.2)
kramdown-parser-gfm (= 1.1.0)
liquid (= 4.0.3)
mercenary (~> 0.3)
minima (= 2.5.1)
nokogiri (>= 1.12.5, < 2.0)
nokogiri (>= 1.13.6, < 2.0)
rouge (= 3.26.0)
terminal-table (~> 1.4)
github-pages-health-check (1.17.9)
Expand All @@ -105,13 +86,13 @@ GEM
octokit (~> 4.0)
public_suffix (>= 3.0, < 5.0)
typhoeus (~> 1.3)
html-pipeline (2.14.0)
html-pipeline (2.14.2)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.8.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.9.0)
jekyll (3.9.2)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
Expand All @@ -129,12 +110,12 @@ GEM
jekyll-coffeescript (1.1.1)
coffee-script (~> 2.2)
coffee-script-source (~> 1.11.1)
jekyll-commonmark (1.3.1)
commonmarker (~> 0.14)
jekyll (>= 3.7, < 5.0)
jekyll-commonmark-ghpages (0.1.6)
commonmarker (~> 0.17.6)
jekyll-commonmark (~> 1.2)
jekyll-commonmark (1.4.0)
commonmarker (~> 0.22)
jekyll-commonmark-ghpages (0.2.0)
commonmarker (~> 0.23.4)
jekyll (~> 3.9.0)
jekyll-commonmark (~> 1.4.0)
rouge (>= 2.0, < 4.0)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
Expand Down Expand Up @@ -166,7 +147,7 @@ GEM
rubyzip (>= 1.3.0, < 3.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.7.1)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
Expand Down Expand Up @@ -219,7 +200,7 @@ GEM
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
kramdown (2.3.1)
kramdown (2.3.2)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
Expand All @@ -233,25 +214,22 @@ GEM
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.15.0)
multipart-post (2.1.1)
nokogiri (1.13.3)
minitest (5.16.2)
nokogiri (1.13.8)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
octokit (4.22.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
public_suffix (4.0.7)
racc (1.6.0)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.26.0)
ruby-enum (0.9.0)
i18n
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
safe_yaml (1.0.5)
Expand All @@ -260,33 +238,34 @@ GEM
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sawyer (0.8.2)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
faraday (>= 0.17.3, < 3)
simpleidn (0.2.1)
unf (~> 0.1.4)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.9)
tzinfo (1.2.10)
thread_safe (~> 0.1)
tzinfo-data (1.2021.5)
tzinfo-data (1.2022.1)
tzinfo (>= 1.0.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8)
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
wdm (0.1.1)
zeitwerk (2.5.4)
zeitwerk (2.6.0)

PLATFORMS
ruby
x64-mingw-ucrt
x64-mingw32

DEPENDENCIES
github-pages (~> 223)
github-pages (~> 227)
jekyll (~> 3.9.0)
jekyll-feed (~> 0.15)
kramdown-parser-gfm
Expand All @@ -296,4 +275,4 @@ DEPENDENCIES
wdm (~> 0.1.0)

BUNDLED WITH
2.3.7
2.3.19
2 changes: 2 additions & 0 deletions docs/_data/api_items.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
path: download-translation-files
- title: Upload translation file
path: upload-translation-file
- title: Delete translation file
path: delete-translation-file
- title: Translation keys
path: keys
sub_paths:
Expand Down
2 changes: 1 addition & 1 deletion docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h3>Additional info</h3>
<h3>External resources</h3>

<ul>
<li><a href="https://app.lokalise.com/api2docs/curl/" target="_blank">Lokalise APIv2 docs</a></li>
<li><a href="https://developers.lokalise.com/reference/lokalise-rest-api" target="_blank">Lokalise APIv2 docs</a></li>
<li><a href="https://lokalise.github.io/ruby-lokalise-api/" target="_blank">Ruby API client</a></li>
<li><a href="https://github.com/lokalise/php-lokalise-api" target="_blank">PHP API client</a></li>
<li><a href="https://lokalise.github.io/node-lokalise-api/" target="_blank">Node.js API client</a></li>
Expand Down
13 changes: 13 additions & 0 deletions docs/additional_info/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 2.3.0 (28-Jul-2022)

* Added support for [Delete file endpoint](https://developers.lokalise.com/reference/delete-a-file):

```elixir
{:ok, %{} = resp} = Files.delete(project_id, file_id)

resp.file_deleted # => true
resp.project_id # => "123.abc"
```

* Fixed documentation links

## 2.2.0 (17-Dec-2021)

* Added experimental support for API tokens obtained via OAuth 2 workflow. To use such tokens:
Expand Down
4 changes: 2 additions & 2 deletions docs/additional_info/exception_handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Error codes

[Error codes used by the API](https://app.lokalise.com/api2docs/curl/#resource-errors)
[Error codes used by the API](https://developers.lokalise.com/reference/api-errors)

If an error is raised by the API, a tuple with three elements will be returned:

Expand All @@ -25,6 +25,6 @@ end

## API Rate Limits

[Access to all endpoints is limited](https://app.lokalise.com/api2docs/curl/#resource-rate-limits) to 6 requests per second from 14 September, 2021. This limit is applied per API token and per IP address. If you exceed the limit, a 429 HTTP status code will be returned and the corresponding exception will be raised that you should handle properly. To handle such errors, we recommend an exponential backoff mechanism with a limited number of retries.
[Access to all endpoints is limited](https://developers.lokalise.com/reference/api-rate-limits) to 6 requests per second from 14 September, 2021. This limit is applied per API token and per IP address. If you exceed the limit, a 429 HTTP status code will be returned and the corresponding exception will be raised that you should handle properly. To handle such errors, we recommend an exponential backoff mechanism with a limited number of retries.

Only one concurrent request per token is allowed.
2 changes: 1 addition & 1 deletion docs/additional_info/license_type.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3 Clause

Copyright 2021 Lokalise Group, Ilya Bodrov
Copyright 2022 Lokalise Group, Ilya Krukowski

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Expand Down
14 changes: 6 additions & 8 deletions docs/api/branches.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Branches

[Branches attributes](https://app.lokalise.com/api2docs/curl/#resource-branches)

## Fetch branches

[Doc](https://app.lokalise.com/api2docs/curl/#transition-list-all-branches-get)
[Doc](https://developers.lokalise.com/reference/list-all-branches

```elixir
{:ok, branches} = ElixirLokaliseApi.Branches.all(project_id, page: 2, limit: 1)
Expand All @@ -15,7 +13,7 @@ branch.name

## Fetch branch

[Doc](https://app.lokalise.com/api2docs/curl/#transition-retrieve-a-branch-get)
[Doc](https://developers.lokalise.com/reference/retrieve-a-branch

```elixir
{:ok, branch} = ElixirLokaliseApi.Branches.find(project_id, branch_id)
Expand All @@ -26,7 +24,7 @@ branch.name

## Create branch

[Doc](https://app.lokalise.com/api2docs/curl/#transition-retrieve-a-branch-get)
[Doc](https://developers.lokalise.com/reference/retrieve-a-branch

```elixir
data = %{name: "Elixir"}
Expand All @@ -38,7 +36,7 @@ branch.name

## Update branch

[Doc](https://app.lokalise.com/api2docs/curl/#transition-update-a-branch-put)
[Doc](https://developers.lokalise.com/reference/update-a-branch

```elixir
data = %{name: "Elixir-update"}
Expand All @@ -50,7 +48,7 @@ branch.name

## Delete branch

[Doc](https://app.lokalise.com/api2docs/curl/#transition-delete-a-branch-delete)
[Doc](https://developers.lokalise.com/reference/delete-a-branch

```elixir
{:ok, resp} = ElixirLokaliseApi.Branches.delete(project_id, branch_id)
Expand All @@ -60,7 +58,7 @@ resp.branch_deleted

## Merge branch

[Doc](https://app.lokalise.com/api2docs/curl/#transition-merge-a-branch-post)
[Doc](https://developers.lokalise.com/reference/merge-a-branch

```elixir
data = %{force_conflict_resolve_using: "target", target_branch_id: target_branch_id}
Expand Down
Loading

0 comments on commit e41f188

Please sign in to comment.