{"id":20590003,"url":"https://github.com/doist/todoistpojos","last_synced_at":"2025-04-14T22:37:21.442Z","repository":{"id":20275751,"uuid":"23548924","full_name":"Doist/TodoistPojos","owner":"Doist","description":"Todoist POJOs for Java and Android applications.","archived":false,"fork":false,"pushed_at":"2023-09-19T11:37:05.000Z","size":435,"stargazers_count":21,"open_issues_count":0,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-28T10:50:19.811Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Doist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-09-01T16:37:16.000Z","updated_at":"2024-01-12T18:04:22.000Z","dependencies_parsed_at":"2024-11-16T07:33:41.709Z","dependency_job_id":"b38c666c-07df-4831-8a47-e1bc65f1c789","html_url":"https://github.com/Doist/TodoistPojos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2FTodoistPojos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2FTodoistPojos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2FTodoistPojos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2FTodoistPojos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Doist","download_url":"https://codeload.github.com/Doist/TodoistPojos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248974702,"owners_count":21192186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T07:33:34.338Z","updated_at":"2025-04-14T22:37:21.425Z","avatar_url":"https://github.com/Doist.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e **Warning** — Not actively maintained.\n\n# TodoistPojos\n\nTodoistPojos is a JVM project which provides the base POJOs (in Kotlin) for most [Todoist API](https://developer.todoist.com/sync/v8/) objects.\n\nThe naming follows the same as the API, both for classes, variables and methods, with very few helper methods added.\n\n## Usage\n\nThese models are usable out of the box. All models and their properties are open to allow subclassing and overriding.\n\n## General considerations\n\n### Temporary ids\n\nTemporary ids are negative `long` values. Regular ids start at 0 and go up from there. The API supports any type of value for temporary ids, so special `String` values would also work. However, this would require an additional field to hold the temporary id, additional logic, and seems completely unecessary for most usages.\n\nThe generation of temporary ids is up to the host application, but the algorithm can be really simple: start at -1 and go down from there. An Android application could use something like the following:\n\n```kotlin\n@Synchronized\nfun getNextTempId(context: Context): Long {\n    val preferences = context.getSharedPreferences(\"todoist_temp_ids\", MODE_PRIVATE)\n    val id = preferences.getLong(\"temp_id\", 0) - 1\n    preferences.edit().apply {\n        if (id \u003e Long.MIN_VALUE) {\n            // Save decremented temp id.\n            putLong(\"temp_id\", id)\n        } else {\n            // Restart from -1 in next call.\n            remove(\"temp_id\")\n        }\n        apply()\n    }\n    \n    return id\n}\n```\n\n## License\n\n    Copyright (c) 2016 Doist\n\n    Permission is hereby granted, free of charge, to any person obtaining\n    a copy of this software and associated documentation files (the\n    \"Software\"), to deal in the Software without restriction, including\n    without limitation the rights to use, copy, modify, merge, publish,\n    distribute, sublicense, and/or sell copies of the Software, and to\n    permit persons to whom the Software is furnished to do so, subject to\n    the following conditions:\n\n    The above copyright notice and this permission notice shall be\n    included in all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n    LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n    OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n    WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoist%2Ftodoistpojos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoist%2Ftodoistpojos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoist%2Ftodoistpojos/lists"}