Git Product home page Git Product logo

api-documentation-platform's Introduction

OneSky Platform API

OneSky Platform API provides programmatic access to OneSky's platform management.

The new API

This is new Platform API and is not compatible with the Classic API. This new API covers most of the endpoints of classic API with numerous of new endpoints added and will continue to be actively developed going forward.

Authentication

All of the endpoints require you to authenticate. You will have to find your own API key and API secret. First login to OneSky and find the API key.

API Access

This Platform API is available for organizations subscribed to STARTER or above plans.

Parameters

Name Type Description
api_key string Your own API public key
timestamp integer Current unix timestamp (GMT+0) in seconds
dev_hash string Calculate with timestamp and api_secret
Formula: md5(concatenate(<timestamp>, <api_secret>))

Request

We accept request data in JSON format. Please specify request header with content-type: application/json and encode the data in JSON format.

SSL is applied to protect all request data. Make sure you are using https to initiate request.

Response

Response body will be in JSON format with 2 objects.

  • meta contains the metadata of the response and additional information such as status code, total record count, paginations, etc...
  • data contains the data from your request such as project information, file information, etc...

Currently, we only support JSON data format in response.

Success

Successful request will response with 2xx status code together with response body if there is. Details of response body is shown at the bottom of each endpoints.

Failure

Failure request will response with an error status code together with an error message.

Example:

status 400 bad request
{
  "meta": {
    "status": 400,
    "message": "Your request cannot be processed"
  },
  "data": {}
}

For more authentication error troubleshooting, please see this article.

Resources

Project

  • Project Group
    • LIST all project groups
    • SHOW project group details
    • CREATE a new project group
    • DELETE a project group
    • list enabled LANGUAGES
  • Project
    • LIST projects of a project group
    • SHOW project details
    • CREATE a new project
    • UPDATE a project
    • DELETE a project
    • list LANGUAGES of a project
  • Project Type
    • LIST all project types

String

  • File
    • LIST uploaded files
    • UPLOAD a file
    • DELETE a file
  • Translation
    • EXPORT translations in files
    • export translations in MULTILINGUAL files
    • export translations of APP STORE Description
    • GET translation status
  • Import Task
    • LIST import tasks
    • SHOW import task

Order

  • Quotation
    • SHOW a quotation
  • Order
    • LIST all orders
    • SHOW order details
    • CREATE an order

Language

Wrappers

PHP

PHP Symphony

Python

Ruby

Rails

Grunt

Node.js

  • nodejs-onesky-utils - Brainly (A known issue with the error message { message: 'Unable to fetch document', code: 500 } has been identified. To address this issue, a workaround has been proposed here. We recommend that users apply the provided patch before utilizing the package)

Go

C#

.NET

Elixir

api-documentation-platform's People

Contributors

cherrry avatar cowcow02 avatar dunyakirkali avatar gregatonesky avatar jacquetwong avatar loking avatar maggieonesky avatar nick-anobii avatar nick-onesky avatar quadratnewby avatar rubyluk avatar ryan-coleman avatar ryan-dan-coleman avatar sebastianczoch avatar vincentkwok avatar vlmh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-documentation-platform's Issues

Support version control

Hello, could you please support version control. Because we need add functions that support online update for App. Not need publishing a new version. Maybe having some 'flags' can identity a new version, I don't know, Could you please tell me?

Export translations

We have problems to export translations via php Library for One Sky APP API. We have same upload files in OneSkyApp in format .xls, but We export the string of this files the API print error "File format (.xlsx (Microsoft Excel 2007)) is not downloadable through API".

How can we download via API all the strings of a project?

Thanks you

translation/status missing is_ready_to_publish

Hi,
I'm cheking my projects translations status, one of them is publish-ready but no data in giving by the API about this.

PHP response

'file_name' => 'filename.po',
'locale' => array(
       'code' => 'en',
       'english_name' => 'English',
       'local_name' => 'English' . "\0" . '',
       'custom_locale' => NULL,
       'locale' => 'en',
       'region' => '',
),
'progress' => '100.0%',
'string_count' => 249,
'word_count' => 1282

https://github.com/onesky/api-documentation-platform/blob/master/resources/translation.md#status---translations-status

Bad PHP file export output

I have uploaded output of var_export, because API does not understand $msg['bla'].

And it seems that it could not return normal output of array too. It does not escape ' symbol and returns array formed with ' symbol.

Screenshot upload issue

I'm having problem uploading screenshot via API. Everything works fine except one fact - one Tag is always missing for uploaded screenshot.

What I'm doing (everything done via API):

  1. Creating project group (Creates fine)
  2. Creating project (Also fine)
  3. Uploading 2 INI files with similar keys, but different locales (all phrases are uploaded and parsed ok)
  4. Uploading screenshot with tags referencing 4 keys from file(s) uploaded on step 3. (Only 3 keys appear to have screenshot attached).

What I've tried:

  • Reordering tags inside screenshot object (POST request body) - in case missed one is first in the tag list - Nothing
  • Renaming keys - in case that missing one is first alphabetically - Nothing
  • Reordering strings in original files - in case first key from file is skipped - Bingo!

It appears that key from first file's line is never attaches to screenshot by tag.

Thanks in advance!

Request to check for modifications (enhancement)

It would be nice to have a request to get the timestamp of the most recently updated phrase.

My translations are downloaded once in a while by the app, but to prevent transferring the same data over and over again I would like to do a check to see if anything has changed. When the timestamps doesn't match, I know I have to download the updated files again.

Thanks!

multi translations translation on PHP library

Please add multi translations support to PHP library.

I modified Client.php:
protected $resources = array(
////......
'multi_translations' => array(
'export' => '/projects/:project_id/translations/multilingual',
'status' => '/projects/:project_id/translations/multilingual/status',
),
////....

Listing screenshots

I see there is an POST upload-screenshots endpoint, but the same endpoint does not seem to respond to GET. ( i get a 404 )

The format used for the POST would be perfect as a respone to a GET for that same uri. Perhaps with the b64 encoded image being optional.

What i want to do is just to enumerate all phrases that do not have at least one screenshot.

Add GitHub action in Readme

Hi,
I created a small open source GitHub Action that can be used to upload from GitHub the resource files (for instance, every time we merge a PR against a stable branch, or on a cron job fashion). Here's the action in the marketplace https://github.com/marketplace/actions/onesky-file-uploader

This issue is to get approval to add it to the Readme just like the wrappers are created. Is it ok if I create a PR for that?

Thanks!

No support for compressed translation download

It would be nice, that it be possible to order zip file over API, and later download it when other API link returned URL for it.

Exp:
/project/1234567/file/order?type=zip&include=...&exlude=... Response: FileOrderId: 654158
/project/1234567/file/orderStatus?id=654158 Response: Generating AND/OR Done, Link

Obtain the language id

I'm looking for a working solution, to obtain the url to the translation page. Unfortunately, the API does not provide the required language id.

The API should provide some url's to translation pages, like GitHub does:

GET https://platform.api.onesky.io/1/projects/:project_id/translations/status

Expected results:

{
    "meta": {
        "status": 200
    },
    "data": {
        "file_name": "string.po",
        "locale": {
          ...
        },
        "html_url": "http://.../translate/project/project/:project/language/:id", // <--
        "progress": "92%",
          ...
    }
}

Get translations does not support format parameter anymore

Hey, we are just migrating from the old API. Before, there was a "format" parameter when downloading the files, so you could download the same translations for example for Android as xml and iOS as strings file. Now you only seem the get to format that was uploaded. What do you expect us to do now? Converting the files by script is an option, but not very fail-safe.

https://api.oneskyapp.com/2/string/download
vs.
https://platform.api.onesky.io/1/projects/???/translations

Best regards,
jkoepcke.

Successfully upload on api but phrase not showing on the website dashboard

  meta: { status: 201 },
  data: {
    name: 'frontend-dictionary-2.en.json',
    format: 'HIERARCHICAL_JSON',
    language: {
      code: 'ko',
      english_name: 'Korean',
      local_name: '한국어',
      custom_locale: null,
      locale: 'ko',
      region: ''
    },
    import: {
      id: 14360283,
      created_at: '2022-12-29T08:57:17+0000',
      created_at_timestamp: 1672304237
    }
  }
}
{
  meta: { status: 201 },
  data: {
    name: 'frontend-dictionary-2.en.json',
    format: 'HIERARCHICAL_JSON',
    language: {
      code: 'it-IT',
      english_name: 'Italian (Italy)',
      local_name: 'Italiano (Italia)',
      custom_locale: null,
      locale: 'it',
      region: 'IT'
    },
    import: {
      id: 14360284,
      created_at: '2022-12-29T08:57:17+0000',
      created_at_timestamp: 1672304237
    }
  }
}

Hey, This is the response I get after run the script, But there is nothing on the website. Could any one help me with this? Thank you.

Wrong project languages response

Current response:

en - en - English
zh - zh-CN - Chinese Simplified
fr - fr - French
de - de - German
pt - pt-PT - Portuguese (Portugal)
ru - ru - Russian
nl - nl - Dutch
pl - pl - Polish
da - da - Danish
lv - lv-LV - Latvian (Latvia)
lt - lt-LT - Lithuanian (Lithuania)
et - et-EE - Estonian (Estonia)
es - es-ES - Spanish (Spain)
pt - pt - Portuguese
es - es - Spanish
it - it - Italian
bg - bg-BG - Bulgarian (Bulgaria)
bg - bg - Bulgarian

I don't have bg - bg and es - es ant pt - pt registered in website. It seems that they get registered automatically if I upload them.

Expected result
Return registered languages in website only. If not registered drop an error.

Paths in filename while uploading a file is ignored

We are using the file upload API:s to upload our translations
https://github.com/onesky/api-documentation-platform/blob/master/resources/file.md#upload---upload-a-file

We need to use paths in the filename to be able to upload multiple strings.xml files.

But if we upload the files with the name foo/strings.xml onesky is saving it as strings.xml.

We use retrofit and have the endpoint set up like this:

val file : File = File("foo/strings.xml")
val part = MultipartBody.Part.createFormData("file", "foo/strings.xml", file.asRequestBody())

@Multipart
@POST("projects/{projectId}/files")
suspend fun uploadFile(
    @Path("projectId") projectId: Int,
    @Part() file: MultipartBody.Part,
    @Query("is_keeping_all_strings") keepAllStrings: Boolean,
    @Query("file_format") fileFormat: String = "ANDROID_XML",
): Response<UploadResponseBody>

Inspecting the request in an interceptor the part looks like
Content-Disposition: form-data; name="file"; filename="foo/strings.xml"

Response is:


response is:
{
 "meta": {
   "status": 201
 },
 "data": {
   "name": "strings.xml",
   "format": "ANDROID_XML",
   "language": {
     "code": "en",
     "english_name": "English",
     "local_name": "English",
     "custom_locale": null,
     "locale": "en",
     "region": ""
   },
   "import": {
     "id": 14178474,
     "created_at": "2022-12-05T11:55:08+0000",
     "created_at_timestamp": 1670241308
   }
 }
}

How can we set the full path while uploading a file through the API:s? It seems to be possible to manually rename the file string.xml to foo/string.xml in onesky's website.

Upload fails with { message: 'String file not found', code: 404 }

I cannot upload phrases using the API, I get this error

{ message: 'String file not found', code: 404 }

Here's what the url looks like:

https://platform.api.onesky.io/1/projects/159815/files?api_key=...&timestamp=1559209817&dev_hash=...&is_keeping_all_strings=false&file_format=IOS_STRINGS&file=Localizable.strings

The file with this name and format exist in the web app

Add support to download multiple files modified after timestamp

Hi,
I'm moving translations for a big project to OneSky UI and it contains 6000+ files in 4 languages. I'd like to manage my translations in OneSky and automate updating those in my project. To achieve that I need to download all the translation files that were modified i.e. within the last day or last week. This option would significantly decrease the number of requests I need to do to export my translations and put them into my project.

What I need:

solution 1:

  • filter files by modification date

solution 2:

  • export files filtered by modification date

extra:

  • export multiple files at once compressed into a ZIP archive

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.