File tree Expand file tree Collapse file tree 9 files changed +4315
-149
lines changed
Expand file tree Collapse file tree 9 files changed +4315
-149
lines changed Original file line number Diff line number Diff line change 22
33[ ![ npm version] ( https://badge.fury.io/js/todoist.svg )] ( https://badge.fury.io/js/todoist )
44
5- This module implements v8 of Todoist Sync API described [ here] ( https://developer.todoist.com/sync/v8 / )
5+ This module implements v9 of Todoist Sync API described [ here] ( https://developer.todoist.com/sync/v9 / )
66
77## Installation
88
@@ -19,7 +19,7 @@ yarn add todoist
1919## Usage
2020
2121``` javascript
22- const Todoist = require (' todoist' ).v8
22+ const Todoist = require (' todoist' ).v9
2323const todoist = Todoist (process .env .TODOIST_API_KEY )
2424
2525;(async () => {
Original file line number Diff line number Diff line change 22 * simple.js
33 */
44
5- const Todoist = require ( '../' ) . v8
5+ const Todoist = require ( '../' ) . v9
66const api = Todoist ( process . env . TODOIST_API_KEY )
77
88; ( async ( ) => {
Original file line number Diff line number Diff line change 22 * simple.js
33 */
44
5- import { v8 as Todoist , TodoistV8Types } from '..'
5+ import { v9 as Todoist , TodoistV9Types } from '..'
66
77const api = Todoist ( process . env . TODOIST_API_KEY )
88
9- const handleItem = ( item : TodoistV8Types . Item ) => {
9+ const handleItem = ( item : TodoistV9Types . Item ) => {
1010 /* … Do something with a Todoist-Item */
1111}
1212
1313; ( async ( ) => {
1414 await api . sync ( )
1515
16- const items /* : TodoistV8Types .Item[] */ = api . items . get ( )
16+ const items /* : TodoistV9Types .Item[] */ = api . items . get ( )
1717 items . map ( handleItem )
1818
19- const projects /* : TodoistV8Types .Project[] */ = api . projects . get ( )
19+ const projects /* : TodoistV9Types .Project[] */ = api . projects . get ( )
2020 projects . map ( handleItem ) // fails, as an item is not compatible with a project
2121} ) ( )
Original file line number Diff line number Diff line change 11{
22 "name" : " todoist" ,
3- "version" : " 0.5.1 " ,
4- "description" : " Todoist Sync API v8 " ,
3+ "version" : " 1.0.0 " ,
4+ "description" : " Todoist Sync API v9 " ,
55 "homepage" : " https://github.com/romgrk/node-todoist" ,
66 "bugs" : {
77 "url" : " https://github.com/romgrk/node-todoist/issues"
Original file line number Diff line number Diff line change 1- import { Todoist as TodoistV8 } from './v8 '
2- import * as TodoistV8Types from './v8 -types'
1+ import { Todoist as TodoistV9 } from './v9 '
2+ import * as TodoistV9Types from './v9 -types'
33
44// export V8 as the current version
5- export const Todoist = TodoistV8
5+ export const Todoist = TodoistV9
66
77// create backwards compatibility list
8- export const v8 = TodoistV8
8+ export const v9 = TodoistV9
99// export Types as well
10- export { TodoistV8Types }
10+ export { TodoistV9Types }
You can’t perform that action at this time.
0 commit comments