約 1,018,433 件
https://w.atwiki.jp/api_programming/pages/67.html
http //api.toodledo.com/3/ 下位ページ Content Task(タスク)のデータフィールド タスクの取得(Retrieve Task) Adding Tasks Editing Tasks Deleting Tasks Error Codes Task(タスク)のデータフィールド retrieve, setに共通して用いられるフィールド GT AD ED DN DD SR フィールド 定義 フォーマット、制限 △ ◯ added タスクが追加された日。UNIX時間で表記。 タスクが追加された「時間」は記録されない。常に正午としてカウントされる。 △ ◯ addedby タスクを割り当てたユーザのId (※subscriptionユーザ限定). ◯ × after この時間以降に更新したタスクを探索 UNIX時間。 △ ◯ attachment 添付アイテムの配列。各アイテムは3つのフィールドを含む。添付アイテムは読み取り専用。アウトラインを参照するidを使えます。リスト(list)、ノート(note)はこのAPIを通して取得可。ファイルは現在読めないが、機能追加準備中。 ○ - - - - × before この時間以前に更新したタスクを探索 UNIX時間。 × ◯ checked Whether the task is completed or not △ ◯ children このタスクが持つサブタスク数 サブタスク自身や、サブタスクを持たないタスクは0 ◯ comp 未完了、完了の選択。 0 未完のみ、1 完了のみ、無しor-1 両方 × ◯ ◯ completed いつタスクが完了したか 未完了の場合、0.UNIX時間。Toodledoはタスクが完了した「時間」はトラッキングしない。そのため、タスクは正午に完了、として処理される。 △ ◯ ◯ context コンテクストのID番号 コンテクスト割当なしの場合は省略(もしくは0) △ ◯ ◯ duedate タスクの期限(日) UNIXタイムスタンプ(GMTの正午)タイムスタンプ=1445172465↓日時(Tokyo)=2015/10/18 21 47 45 △ ◯ ◯ duedatemod 期限(日)のタイプを示す整数 0 Due By1 Due On (=)2 Due After ( )3 Optionally (?) △ ◯ ◯ duetime for when the task is due. UNIX時間。設定しなければ0.duedateが設定されず、duetimeのみが設定されていると、1970年1月1日と判断。タイムゾーンにかかわらず、10amは10amと判断。You can convert this timestamp to a GMT string and display the time component without worrying about timezones. ◯ duration ○ fields レスポンスに付けて返してほしいフィールド コンマ区切り。レスポンス向上のため、不用なら省略する。 △ ◯ ◯ folder フォルダのID番号 フォルダ割当なしの場合は0もしくは省略。 △ ◯ ◯ goal goalのID番号 goal割当なしの場合は省略(もしくは0) △ - ● - - × id タスクID アカウントに対してユニークな番号(違うアカウントに対しては、同一のIDに対して異なるタスクがぶら下がる可能性あり。 △ ◯ length タスク達成までの予想時間(分、整数値) △ ◯ ◯ location 場所のID番号 割当なしの場合は省略(もしくは0) △ ◯ meta A text for storing metadata about the task. This is useful for syncing data that cannot otherwise be synced to Toodledo. Because of an implementation detail, using the meta field introduces extra latency to each API call, so you should only use this field when necessary. 1,024バイトまで。タスクごとにユニークなIDを持ち、AppIDに対してprivate。ユーザーもAppIDsも個々に入力した値は見られない。 - ◯ modified for when the task was last modified. UNIX時間。 △ ◯ note ノート 32,000 bytesまで。改行コードは\n ◯ num 取得するタスク数。複数ページで表示する場合などに使用 デフォルト値、最大値ともに1000 △ × order サブタスクの順番 読み取り専用 △ ◯ parent 親タスクのID番号 デフォルト値はO △ × previous If the task was repeated from another task, this will contain the id number of the previous version of this task. △ ◯ ◯ priority 優先順位。整数値。 3 = Top2 = High,1 = Medium,0 = Low,-1 = Negative, △ ◯ ◯ remind リマインダが送られる、タスクの期限までの時間(分)を表す整数値。 0 リマインダなし値の制限:0, 1, 15, 30, 45, 60, 90, 120, 180, 240, 1440, 2880, 4320, 5760, 7200, 8640, 10080, 20160, 43200)。これ以外は近い値に丸め。無料ユーザーは0か60。 △ ◯ ◯ repeat どのようにタスクを繰り返すかを示す文字列 記録を残すため、リピートするタスクが完了した場合ははコピーされたタスクがリストに加えられ、完了タスクに対して、新しいID番号が付与される。繰り返しを中止するには、これに空文字列を設定。記法は※を参照。 △ ◯ shared that indicates if the task is shared as a joint task (Subscription required for user). A boolean (0 or 1) 。読み取り専用 - × sharedowner The user id of the person who owns the task that is being shared with the current user. If the current user is not the owner, then they cannot make changes to the collaboration settings for this task, although they can make other changes. 読み取り専用 - × sharedwith An array of user ids for people that this task is shared with, other than myself and the owner. Read only. △ ◯ ◯ star スターの有無 0 スターあり1 スターなし ◯ start スキップするタスク数。複数ページで表示する場合などに使用 デフォルト値は0 △ ◯ ◯ startdate タスクの開始(日) A GMT unix timestamp △ ◯ ◯ starttime for when the task starts. UNIX時間。 △ ◯ ◯ status タスクのステータスを表す整数値 0 = None, 1 = Next Action,2 = Active, 3 = Planning,4 = Delegated, 5 = Waiting,6 = Hold, 7 = Postponed,8 = Someday, 9 = Canceled,10 = Reference × ◯ subtask △ ◯ ◯ tag タグ 複数の場合はコンマで区切る。64文字まで。 △ ● ◯ - - ◯ title タスクタイトル 文字列。255文字まで。 △ ◯ timer The value in the timer field indicates the number of seconds that have elapsed for the timer not including the current session. × ☓ timeron (タイマーON時)タイマースタート時間のタイムスタンプ Total Time=timer+(now-timeron). Where "now" is a unix timestamp for the current time. △ ◯ via A read-only field that indicates how the task was added. 読み取り専用-0 Main website-1 Email Import,-2 Firefox Addon-3 This API,-4 Widgets (Google Gadget, etc)-5 Not used,-6 Mobile Phone-7 iPhone App,-8 Import Tools-9 Twitter ※繰り返し(repeat)を表現する文字列は、iCal RRULEフォーマットに従う。 "FREQ=DAILY" "FREQ=WEEKLY;BYDAY=TU" 但し、Toodledoで全てのiCal RRULEが解釈されるわけではない(鋭意対応中)。ので、ToodledoのFAQを参照のこと。ユーザーがGUIや人間が理解できる文字列(英語)で記入する。iCalのルールに変換される。 There are three enhancements to the iCal RRULE format that we have made to support some advanced Toodledo features. Subtasks can repeat based on their parent s repeat value. There is not a comparable iCal RRULE for this, so we have a custom RRULE of "PARENT" to indicate this setting. Tasks can be set to repeat from their due-date or their completion date. There is not a way to indicate this in a standard iCAL RRULE. To indicate this, we have a custom string of ";FROMCOMP" that we append to the RRULE if the task is set to repeat from the completion date. The absence of this string means that the task repeats from the due-date. Normally, when a task is rescheduled it moves forwards by 1 occurrence. If the user has procrastinated, the new due-date could still be in the past. Toodledo will have the option to indicate that certain repeating tasks should be rescheduled to the next future occurance of the task. If this is the case, the custom ";FASTFORWARD" string will be appended to the RRULE. タスクの取得(Retrieve Task) 上記の記号◯:リスエスト時に指定できる △:fieldオプションの選択値(レスポンスに含めてほしい情報)として指定できる ×:使用不可 Adding Tasks http //api.toodledo.com/3/tasks/add.php access_token=yourtoken tasks=[{"title" "My Task"},{"title" "Another","star" "1","ref" "98765"},{"title" "","ref" "1234"}] fields=folder,star METHOD POST 一度に登録できるタスクは50個まで "tasks/add.php" API call with an array of tasks. 必須パラメータ title field 任意パラメータ folder, context, goal, location, priority, status,star, duration, remind, starttime, duetime, completed, duedatemod, repeat, tag, duedate, startdate, note, parent, meta (see above for possible values). There is also a special field called "ref" that you can use to pass through an alphanumeric id number to aid in matching things up after a sync. The "ref" field is not saved into the task, it is only echoed back to you on this call. Tasks are added by creating a JSON object (example below) and submitting a POST to the API. Please represent newline characters as \n. Be sure to encode the data properly for transfer via a URL (symbols replaced with their %XX equivalent and spaces encoded as +). Each element in the array will be a task object. You only need to set the fields that you want to set. For efficiency, you should try to send only the fields that you are setting. If the action was successful the added tasks will be returned in the same order in which they were added. If there were any errors on individual tasks, they will be output inline with the returned tasks, so you can determine which action failed. You can also specify xml as the output format for any API calls by attaching "f=xml" to the URL. http //api.toodledo.com/3/tasks/add.php access_token=yourtoken Editing Tasks You can edit up to 50 tasks at a time by making a POST to the "tasks/edit.php" API call. For each task, the id field is required, and the following fields are optional title, folder, context, goal, location, priority, status,star, duration, remind, starttime, duetime, completed, duedatemod, repeat, tag, duedate, startdate, note, parent, meta (see above for possible values). Additionally, you can set the "reschedule" variable to "1" if you want Toodledo to automatically reschedule the repeating task for you. This will only apply if you also set the completion date, and if the task has a due-date and repeating value. If you do not set this, then you are responsible for rescheduling repeating tasks yourself, as well as properly handling any subtasks that the task may have. It is recommended that you allow Toodledo to reschedule repeating tasks for you. Tasks are added by creating a JSON object (example below) and submitting a POST to the API. Be sure to encode the data properly for transfer via a URL (symbols replaced with their %XX equivalent and spaces encoded as +). Please represent newline characters as \n. Each element in the array will be a task object. You only need to set the fields that you want to set. For efficiency, you should try to send only the fields that have changed. http //api.toodledo.com/3/tasks/edit.php access_token=yourtoken tasks=[{"id"%3A"1234"%2C"title"%3A"My Task"}%2C{"id"%3A"1235"%2C"title"%3A"Another Task"%2C"star"%3A"1"} %2C{"id"%3A"5678"%2C"title"%3A"Invalid"}] fields=folder,star If the action was successful the edit tasks will be returned. If there were any errors on individual tasks, they will be output inline with the returned tasks, so you can determine which action failed. [{"id" 1234,"title" "My Task","modified" 1281990824,"completed" 0,"folder" 0,"star" 0}, {"id" 1235,"title" "Another","modified" 1280877483,"completed" 0,"folder" 0,"star" 1}, {"errorCode" 605,"errorDesc" "Invalid task ID","ref" "5678"}] You can also specify xml as the output format for any API calls. http //api.toodledo.com/3/tasks/edit.php access_token=yourtoken tasks=[{"id"%3A"1234"%2C"title"%3A"My Task"}%2C{"id"%3A"1235"%2C"title"%3A"Another Task"%2C"priority"%3A"2"} %2C{"id"%3A"5678"%2C"title"%3A"Invalid"}] fields=folder,star f=xml tasks task id 1234 /id title My Task /title folder 0 /folder modified 1234567890 /modified completed /completed star 0 /star /task task id 1235 /id title Another Task /title folder 0 /folder modified 1234567890 /modified completed /completed star 1 /star /task error id="605" ref="5678" Invalid task ID /error /tasks Deleting Tasks The "/tasks/delete.php" API call will allow you to permanently delete up to 50 tasks at a time. You can access this via POST. For tasks that the user wants available in the history section, or for tasks that continue to repeat, you should not use this method. Instead, you should edit the task and mark it as completed. Tasks are deleted by submitting a JSON encoded array of id numbers to the API. http //api.toodledo.com/3/tasks/delete.php access_token=yourtoken tasks=["1234"%2C"1235"%2C"5678"] If the action was successful the deleted tasks s id numbers will be returned. If there were any errors on individual tasks, they will be output inline with the returned tasks, so you can determine which action failed. [{"id" 1234},{"id" 1235},{"errorCode" 605,"errorDesc" "Invalid ID number","ref" "5678"}] You can also specify xml as the output format for any API calls. http //api.toodledo.com/3/tasks/delete.php access_token=yourtoken tasks=["1234"%2C"1235"%2C"5678"] f=xml deleted id 1234 /id id 1235 /id Invalid ID number /deleted Get Deleted Tasks The "/tasks/deleted.php" API call will enable you to detect when a task was deleted on Toodledo, so you can also delete the task from your application. You can access this via GET or POST. after A GMT unix timestamp. Used to find tasks with a deletion date and time after this date and time. http //api.toodledo.com/3/tasks/deleted.php access_token=yourtoken after=1234567890 This returns a list of id numbers and datetime stamps. [{"num" 24},{"id" 1234,"stamp" 1234567891},{"id" 1235,"stamp" 1234567892}] You can also specify xml as the output format for any API calls. http //api.toodledo.com/3/tasks/deleted.php?access_token=yourtoken after=1234567890 f=xml deleted num="2" task id 12345 /id stamp 1234567891 /stamp /task task id 67890 /id stamp 1234567892 /stamp /task /deleted Error Codes Any of the API calls can return error messages. Here is a list of the error messages that you may receive from the tasks API endpoints. If there was an error when editing or deleting a task, the id number that you attempted to edit will be included in the error s "ref" field for your reference. 601 Your task must have a title. 602 Only 50 tasks can be added/edited/deleted at a time. 603 The maximum number of tasks allowed per account (20000) has been reached 604 Empty id 605 Invalid task 606 Nothing was added/edited. You ll get this error if you attempt to edit a task but don t pass any parameters to edit. 607 Invalid folder id 608 Invalid context id 609 Invalid goal id 610 Invalid location id 611 Malformed request 612 Invalid parent id 613 Incorrect field parameters 614 Parent was deleted 615 Invalid collaborator 616 Unable to reassign or share task Examples JSON {"errorCode" 601,"errorDesc" "Your task must have a name","ref" 1234} XML error id="601" ref="1234" Your task must have a name /error GT AD ED DN DD SR フィールド 定義 フォーマット、制限 編集 △ ◯ added タスクが追加された日。UNIX時間で表記。 タスクが追加された「時間」は記録されない。常に正午としてカウントされる。 編集 △ ◯ addedby タスクを割り当てたユーザのId (※subscriptionユーザ限定). 編集 ◯ × after この時間以降に更新したタスクを探索 UNIX時間。 編集 △ ◯ attachment 添付アイテムの配列。各アイテムは3つのフィールドを含む。添付アイテムは読み取り専用。アウトラインを参照するidを使えます。リスト(list)、ノート(note)はこのAPIを通して取得可。ファイルは現在読めないが、機能追加準備中。 編集 ○ - - - - × before この時間以前に更新したタスクを探索 UNIX時間。 編集 × ◯ checked Whether the task is completed or not 編集 △ ◯ children このタスクが持つサブタスク数 サブタスク自身や、サブタスクを持たないタスクは0 編集 ◯ comp 未完了、完了の選択。 0 未完のみ、1 完了のみ、無しor-1 両方 編集 × ◯ ◯ completed いつタスクが完了したか 未完了の場合、0.UNIX時間。Toodledoはタスクが完了した「時間」はトラッキングしない。そのため、タスクは正午に完了、として処理される。 編集 △ ◯ ◯ context コンテクストのID番号 コンテクスト割当なしの場合は省略(もしくは0) 編集 △ ◯ ◯ duedate タスクの期限(日) UNIXタイムスタンプ(GMTの正午)タイムスタンプ=1445172465↓日時(Tokyo)=2015/10/18 21 47 45 編集 △ ◯ ◯ duedatemod 期限(日)のタイプを示す整数 0 Due By1 Due On (=)2 Due After ( )3 Optionally (?) 編集 △ ◯ ◯ duetime for when the task is due. UNIX時間。設定しなければ0.duedateが設定されず、duetimeのみが設定されていると、1970年1月1日と判断。タイムゾーンにかかわらず、10amは10amと判断。You can convert this timestamp to a GMT string and display the time component without worrying about timezones. 編集 ◯ duration 編集 ○ fields レスポンスに付けて返してほしいフィールド コンマ区切り。レスポンス向上のため、不用なら省略する。 編集 △ ◯ ◯ folder フォルダのID番号 フォルダ割当なしの場合は0もしくは省略。 編集 △ ◯ ◯ goal goalのID番号 goal割当なしの場合は省略(もしくは0) 編集 △ - ● - - × id タスクID アカウントに対してユニークな番号(違うアカウントに対しては、同一のIDに対して異なるタスクがぶら下がる可能性あり。 編集 △ ◯ length タスク達成までの予想時間(分、整数値) 編集 △ ◯ ◯ location 場所のID番号 割当なしの場合は省略(もしくは0) 編集 △ ◯ meta A text for storing metadata about the task. This is useful for syncing data that cannot otherwise be synced to Toodledo. Because of an implementation detail, using the meta field introduces extra latency to each API call, so you should only use this field when necessary. 1,024バイトまで。タスクごとにユニークなIDを持ち、AppIDに対してprivate。ユーザーもAppIDsも個々に入力した値は見られない。 編集 - ◯ modified for when the task was last modified. UNIX時間。 編集 △ ◯ note ノート 32,000 bytesまで。改行コードは\n 編集 ◯ num 取得するタスク数。複数ページで表示する場合などに使用 デフォルト値、最大値ともに1000 編集 △ × order サブタスクの順番 読み取り専用 編集 △ ◯ parent 親タスクのID番号 デフォルト値はO 編集 △ × previous If the task was repeated from another task, this will contain the id number of the previous version of this task. 編集 △ ◯ ◯ priority 優先順位。整数値。 3 = Top2 = High,1 = Medium,0 = Low,-1 = Negative, 編集 △ ◯ ◯ remind リマインダが送られる、タスクの期限までの時間(分)を表す整数値。 0 リマインダなし値の制限:0, 1, 15, 30, 45, 60, 90, 120, 180, 240, 1440, 2880, 4320, 5760, 7200, 8640, 10080, 20160, 43200)。これ以外は近い値に丸め。無料ユーザーは0か60。 編集 △ ◯ ◯ repeat どのようにタスクを繰り返すかを示す文字列 記録を残すため、リピートするタスクが完了した場合ははコピーされたタスクがリストに加えられ、完了タスクに対して、新しいID番号が付与される。繰り返しを中止するには、これに空文字列を設定。記法は※を参照。 編集 △ ◯ shared that indicates if the task is shared as a joint task (Subscription required for user). A boolean (0 or 1) 。読み取り専用 編集 - × sharedowner The user id of the person who owns the task that is being shared with the current user. If the current user is not the owner, then they cannot make changes to the collaboration settings for this task, although they can make other changes. 読み取り専用 編集 - × sharedwith An array of user ids for people that this task is shared with, other than myself and the owner. Read only. 編集 △ ◯ ◯ star スターの有無 0 スターあり1 スターなし 編集 ◯ start スキップするタスク数。複数ページで表示する場合などに使用 デフォルト値は0 編集 △ ◯ ◯ startdate タスクの開始(日) A GMT unix timestamp 編集 △ ◯ ◯ starttime for when the task starts. UNIX時間。 編集 △ ◯ ◯ status タスクのステータスを表す整数値 0 = None, 1 = Next Action,2 = Active, 3 = Planning,4 = Delegated, 5 = Waiting,6 = Hold, 7 = Postponed,8 = Someday, 9 = Canceled,10 = Reference 編集 × ◯ subtask 編集 △ ◯ ◯ tag タグ 複数の場合はコンマで区切る。64文字まで。 編集 △ ● ◯ - - ◯ title タスクタイトル 文字列。255文字まで。 編集 △ ◯ timer The value in the timer field indicates the number of seconds that have elapsed for the timer not including the current session. 編集 × ☓ timeron (タイマーON時)タイマースタート時間のタイムスタンプ Total Time=timer+(now-timeron). Where "now" is a unix timestamp for the current time. 編集 △ ◯ via A read-only field that indicates how the task was added. 読み取り専用-0 Main website-1 Email Import,-2 Firefox Addon-3 This API,-4 Widgets (Google Gadget, etc)-5 Not used,-6 Mobile Phone-7 iPhone App,-8 Import Tools-9 Twitter 編集
https://w.atwiki.jp/api_programming/pages/99.html
下位ページ Content タスクの追加 http //api.toodledo.com/3/tasks/index.php#retrieving タスクの追加 http //api.toodledo.com/3/tasks/add.phpaccess_token=yourtoken tasks=[{"title" "My Task"},{"title" "Another","star" "1","ref" "98765"},{"title" "","ref" "1234"}] fields=folder,star METHOD POST 一度に登録できるタスクは50個まで "tasks/add.php" API call with an array of tasks.タスク登録に必須のパラメータ title タスク登録に任意のパラメータ folder, context, goal, location, priority, status,star, duration, remind, starttime, duetime, completed, duedatemod, repeat, tag, duedate, startdate, note, parent, meta (see above for possible values). パラメータ(フィールド)は、JSONオブジェクトとして渡す。 fieldsは、返してくる情報に含めてほしいフィールド refという特殊なフィールドがある。これは、英数字で出来たID番号を渡し、同期後に整合性を取るのに用いられる。(まだタスクIDが決まっていないので、(複数のタスクを同時に登録した際に)あるタスクだけが登録を失敗して、どれが失敗したかわからない。タスク名(title)は同じものが複数登録できるのであてに出来ない。ここでrefというIDを(一意になるように)設定してくと、どのタスクが失敗したか(成功したか)が分かるようになる。 という使い方なので、refフィールドはタスクの情報としては保管されず、呼び出し後に返されるのみ。 改行コードは"\n" URLを通じて情報を送るために、正しいエンコードが必要。記号は%XXという形で置き換えられ、spaceは+で置き換えられる。各要素は、一つのタスクオブジェクトとなる。 設定したいフィールドだけ情報を送ればよいし、効率面でもそうすべき。 リクエスト(POST) http //api.toodledo.com/3/tasks/add.php access_token=yourtoken tasks=[{"title" "My Task"},{"title" "Another","star" "1","ref" "98765"},{"title" "","ref" "1234"}] fields=folder,star 実際に実行される文字列(赤字に注目) curl --data "access_token=yourtoken tasks=%5B%7B%22title%22%3A%22My+Task%22%7D%2C%7B%22title%22%3A%22Another%22%2C%22star%22%3A%221%22%2C%22ref%22%3A%2298765%22%7D%2C%7B%22title%22%3A%22%22%2C%22ref%22%3A%221234%22%7D%5D" http //api.toodledo.com/3/tasks/add.php 返ってくる情報(青字 refの例) [{"id" 1234,"title" "My Task","modified" 1281990824,"completed" 0,"folder" 0,"star" 0},{"id" 1235,"title" "Another","modified" 1280877483,"completed" 0,"folder" 0,"star" 1,"ref" "98765"},{"errorCode" 601,"errorDesc" "Your task must have a title","ref" "1234"}] タスクの追加が成功したら、追加したのと同じ順番で追加されたタスクが返される。 追加したタスクにエラーがあったら、返されるタスク中にエラーが出力されるので、どの追加が失敗したかが分かる。 他の操作と同様、出力フォーマットをxmlにすることが可能 f=xml http //api.toodledo.com/3/tasks/add.php access_token=yourtoken
https://w.atwiki.jp/api_programming/pages/71.html
http //api.toodledo.com/3/tasks/doc_search.php Toodledoにはタスクを探す検索ページ(API)がある。一度検索を行ったら、保存して素早くアクセスできるようになる。APIは自分で作成したSaved Searchへのアクセスを提供する。 検索規則 規則はブール演算子で繋がれる。rule1 と rule2 がrootレベルの規則で、 rule3 and rule4 がグルーピングされた規則である場合、 rule1 AND rule2 AND (rule3 OR rule4). 検索の取り出し ユーザーの検索式を次のGETリクエストで取り出すことができる。 http //api.toodledo.com/3/tasks/search.php?access_token=yourtoken 結果はJSONにエンコードされて返ってくる。パラメータにf=xmlを付加すれば、XMLで返すことも可能。 JSON "id" 1234 "name" "MySearch" "bool" "All", "search" "root" [{"field" "checked","type" "no","value" ""},{"field" "title","type" "contains","value" "laundry"}], "1" [{"field" "tag","type" "is","value" "tag"},{"field" "folder","type" "is not","value" "12345"}] "id" 1235 "name" "Another Search" "bool" "Any", "search" {"root" [{"field" "checked","type" "yes","value" ""},{"field" "tag","type" "does not contain","value" "urgent"}]} Explanation of result terms key 内容 制約 id 検索式のid番号。ユーザーの中ではユニーク。 name 検索式の名前(表示名) 最大32文字 bool "Match"オプションの状態。2状態があり、"All" は全てのroot式とgroup式が一致する。グループ内に対しては OR、グループ外、つまりrootとgroupをつなぐのはAND(和積標準型)。"Any" はroot式とgroup式のどれかに一致する。グループ内に対しては AND、グループ外、つまりrootとgroupをつなぐのはOR(積和標準型). search In the JSON return format, this contains the nested rules for the saved search. Each group will have a numerical index (which may or may not be consecutive). Order does not matter. root root規則の配列 group XML形式での返信結果にて、グループ規則の配列 field 検索されるフィールド名 type The type of search being performed (see below). value The value to search with. フィールド名 Toodledo/API/Task/情報フィールド 検索タイプ contains Matches a string if it contains this substring yes Boolean true is Exact value match begins with Matches a string if it starts with this substring ends with Matches a string if it ends with this substring does not contain Matches a string if it does not contain this substring no Boolean false is not Exact value mismatch is after Matches a date if it comes after this value is more than Matches a number if it comes after this value is before Matches a date if it comes before this value is less than Matches a number if it comes before this value was in the last Matches a date if it was in the last X days was not in the last Matches a date if it was not in the last X days is in the next Matches a date if it is in the next X days is not in the next Matches a date if it is not in the next X days is in Matches a date if it is in exactly X days is not in Matches a date if it is not in exactly X days was Matches a date if it was exactly X days ago was not Matches a date if it was not exactly X days ago exists Matches if the field has a non-zero value does not exist Matches if the field is empty or zero エラーコード Any of the API calls can return error messages. The saved search calls may return some of the general error codes.
https://w.atwiki.jp/sevenlives/pages/2262.html
Web API 読み:うぇぶえーぴーあい 英語:Web API 別名: 意味: WebAPIとは、インターネット上で利用出来るAPIのこと。 Web上に存在するサービスを他のサイトで使うためのプログラム群、窓口にあたる。 API同様、自らすべて一から作成しなくとも他社から提供されるWebAPIを使用して高レベルのWebサービスを提供できるようになる。 WebAPIと呼ばれる物は多くは無料で提供され、HTTPプロトコルを使い、XMLベースなど決まったデータ形式のものが多いため容易に利用出来るようになりました。 2015年11月20日 SOAP REST JSON XML APIキー? Rate Limit マッシュ・アップ Webサービス OAuth CDN API
https://w.atwiki.jp/tts-script/pages/20.html
■ TTSで使うAPIとは、 オブジェクトのクラス別(物とか、カウンターとか)に使える スクリプト集である? wiki検索--- APIとは、アプリケーションプログラムインターフェイスの略語で、プログラミングの際に使用できる命令や規約、関数等の集合の事を指す。 ソフトウェア開発の際、いちから全てを作るより、APIを利用すればもともとあるプログラムを呼び出して、その機能を組み込んだソフトウェアを開発することができる。 公式説明--- APIは、グローバルまたはのために一貫しているオブジェクトのスクリプトが、オブジェクトのスクリプトがアクセスできる必要があり、自己であるオブジェクトのスクリプトが接続されています。導入を見つけることができるここに。 The API is consistent for Global or Object Scripts, but Object Scripts have access to self which is the Object the script is attached to. An introduction can be found here.
https://w.atwiki.jp/api_programming/pages/183.html
前置き 地道な Get,Postの処理で認証を受けて、SpreadSheet の情報を取り出したりはできたものの、自前でClassをどんどん作って拡張させていく感じだったので、ライブラリつかいたひ、となって、そのためには、認証とかからこれを使ったほうが良いんじゃないか、ということで挑戦。ただ、Servletとしての説明が載った日本語のサイトがあんまりないので(GData以前はそれなりにある感じ)、いろいろ情報を見ながらトライ&エラーで作ってみた。 基本はここを参照したものの、初心者は四苦八苦。 Google API Client Libraries 流れ自体は通常の認証と変わらないものの、APIでいろいろやってくれる分、中身がわからないので、どこで何をしているのかわからん。 https //developers.google.com/identity/protocols/OAuth2 そして、作って、とりあえず使えそうな見通しがたったところで、 Google Identity Platform こっちの情報をさんしょうすれば、JavaAPIとかいらんかったのか?とか思いながら、まだちゃんと読んでいない。 とりあえずいろいろ集めた情報から サーブレットを使ったパターンとしては AbstractAppEngineAuthorizationCodeServlet.classを実装したクラスで、認証に必要な情報を載せて、リダイレクトさせるGoogleAuthorizationCodeFlow を内部で作って、使用している。上記のクラスを実装しなくても、本来はこれだけあればいい? 認証ページを表示させて、デフォルトで /oauth2callback にリダイレクトさせる。 codeをつけて、リダイレクトさせる。 AbstractAppEngineAuthorizationCodeCallbackServlet.classを実装したクラスで、結果を受ける。リダイレクトされたあとだから、イランと思ったら、ここでもGoogleAuthorizationCodeFlow を内部で作って処理していた。 認証に成功すると Credential がもらえる。 この認証後に、どのページからでも使える?ように access token を Cookie に保存して、再利用することにした。他のやり方がまだわからない。 実装までの四苦八苦 事前準備 使うサイト(Web App)を登録する作業は、Java API を使おうが使うまいが同じ。ここで Client ID とか、Client Secret とかを登録、確認しておく。 また、リダイレクト先も登録。ここで登録したリダイレクト先と、この先のプログラム上で指定しているリダイレクト先が違うとエラーになる。何もしないと多分 /oauth2callback がプログラム内で使用されるので、とりあえずこれを指定した(そしてそういうプログラムを作った)ほうが早いのでは? 認証ページを表示させるところまで。 AbstractAppEngineAuthorizationCodeServlet.classを実装。デベロッパサイトに注意書きとサンプルコートが。 注意:ログインしているユーザがいないと getUserID() が NullPointerException を投げる。- web.xml に次の記述がこんな感じの記述が必要。 security-constraint web-resource-collection web-resource-name any /web-resource-name url-pattern /* /url-pattern /web-resource-collection auth-constraint role-name * /role-name /auth-constraint /security-constraint role-nameの指定で、なんやかんやできるみたいだが。 このページのサンプルコードをそのまま使ったが、オーバーライドすべき initializeFlow 内での AuthorizationCodeFlowの生成で指定するGenericURLとかわからない。 しかしGoogleAuthorizationCodeFlowという拡張されたクラスがあって、こちらのBuilderクラスではGenericURLの指定はなく、代わりにClientID、ClientSecretの指定で済むので、こちらでインスタンスを作る。なお setApprovalPrompt("auto") setAccessType("offline") も指定してbuild() これで動かすとデータへのアクセス許可を聞くサイトへ飛んだ。 リダイレクト後(codeが発行された後の処理) 認証画面へのリダイレクトと同じように、コールバック用のサーブレットとしてAbstractAppEngineAuthorizationCodeCallbackServletを実装。 この中でもAuthorizationCodeFlowが出てくるが、やっぱりGoogleAuthorizationCodeFlowで実装。 このサーブレットでcodeを受け取ると、自動的に(flowがあるから?)access tokenとの交換をしてくれるらしい。オーバーライドする関数として onSuccess onError があって、成功していればonSuccessが処理される。ここの引数としてcredentialがあるので、getAccessTokenでトークンを保存しておけば、しばらくはこれを使ってAPIにアクセスできる。ただ、私は保存の仕方がわからなかったので、Cookieに保管している。 access tokenを受け取った後、実際にAPIを動かす 今回の主目的はSheets API、Calendar API だったので、とりあえずSheets APIで確認。 GoogleCredential gc = new GoogleCredential.Builder().build(); とやるだけで、勝手にどこかに保管されたaccess tokenとか拾ってくれるか、と思ったが、そこまで優しくない。(GoogleCredential.getAccessToken()はnullだったので)Cookieからaccess tokenを取り出して、credentialにセットして Sheets sheet = new Sheets.Builder(HTTP_TRANSPORT, JSON_FACTORY, gc).setApplicationName(APPLICATION_NAME).build(); でオブジェクト作って、叩いたら、データ取り出せた。サンプルは[[Google Sheets API Java Quickstart https //developers.google.com/sheets/quickstart/java]]のmain内の部分。
https://w.atwiki.jp/oooooooo/pages/20.html
Amazon Amazon Web API Amazon Product Advertising APIの認証の件 Amazon Product Advertising API (認証対応) Google http //code.google.com/intl/ja/more/ Yahoo! http //developer.yahoo.co.jp/
https://w.atwiki.jp/sevenlives/pages/2387.html
File API 読み:ふぁいるえーぴーあい 英語:File API 別名: 意味: File APIとは、WebブラウザからローカルファイルにアクセスするためのAPIのこと。 従来のJavaScriptにセキュリティのため、他の言語にあるようなローカルファイルにアクセスするAPIはありませんでした。 Webページは外部にあるファイルを取り寄せるためどんなスクリプトでも仕込める問題があったからです。 しかしWebページがオフライン接続など様々な利用目的が広がるにつれ、ローカルファイルにアクセスする需要も高まりました。 そこでFile APIが策定されました。 もちろんセキュリティとの兼ね合いが必要なので現時点の仕様は極めて限定的です。 読み込みにしか対応しておりませんし、IE9にもまだ実装されていません。 2012年01月06日 File API Writer? File API Directories and System? Drag and Drop API? HTML5 JavaScript
https://w.atwiki.jp/t-kazu/pages/15.html
超参考になるブクログapiの使い方 ブクログのブログパーツAPIで遊んでみた 他のwikiのまとめ方を参考に雛形を作ってみる
https://w.atwiki.jp/akinobu1217/pages/8.html
WEB API関連リンク集 WEB APIリスト 関連キーワード マッシュアップ