Independentsoft
Professional software libraries for developers
Home
Purchase
Support
Company
Contact
Graph C++
>
Tutorial
> Create TodoTask List
The following example shows you how to create a new TodoTask List.
C++ example
#include
#include "independentsoft/graph/graph_client.hpp" #include "independentsoft/graph/graph_exception.hpp" #include "independentsoft/graph/todo/todo_task_list.hpp" using namespace independentsoft::graph; using namespace independentsoft::graph::todo; int main() { try { GraphClient client; client.client_id = "63333333-209e-454e-b7bd-55a4d201270f"; client.tenant = "independentsoft.onmicrosoft.com"; client.username = "info@independentsoft.onmicrosoft.com"; client.password = "password"; TodoTaskList taskList; taskList.display_name = "My Tasks"; TodoTaskList createdTaskList = sync_wait(client.create_todo_task_list(taskList)); std::cout << "Id: " << createdTaskList.id << std::endl; } catch (const GraphException& ex) { std::cout << "Error: " << ex.code << std::endl; std::cout << "Message: " << ex.message << std::endl; } return 0; }
Need help? Ask our developers:
Name*
Email*
Message*