graph_rs_sdk/users/contacts/
request.rs1use crate::api_default_imports::*;
4
5api_client!(
6 ContactsApiClient,
7 ContactsIdApiClient,
8 ResourceIdentity::Contacts
9);
10
11impl ContactsApiClient {
12 post!(
13 doc: "Create contact",
14 name: create_contacts,
15 path: "/contacts",
16 body: true
17 );
18 get!(
19 doc: "List contacts",
20 name: list_contacts,
21 path: "/contacts"
22 );
23 get!(
24 doc: "Get the number of the resource",
25 name: get_contacts_count,
26 path: "/contacts/$count"
27 );
28 get!(
29 doc: "Invoke function delta",
30 name: delta,
31 path: "/contacts/delta()"
32 );
33}
34
35impl ContactsIdApiClient {
36 delete!(
37 doc: "Delete navigation property contacts for users",
38 name: delete_contacts,
39 path: "/contacts/{{RID}}"
40 );
41 get!(
42 doc: "Get contacts from users",
43 name: get_contacts,
44 path: "/contacts/{{RID}}"
45 );
46 patch!(
47 doc: "Update the navigation property contacts in users",
48 name: update_contacts,
49 path: "/contacts/{{RID}}",
50 body: true
51 );
52 post!(
53 doc: "Create new navigation property to extensions for users",
54 name: create_extensions,
55 path: "/contacts/{{RID}}/extensions",
56 body: true
57 );
58 get!(
59 doc: "Get extensions from users",
60 name: list_extensions,
61 path: "/contacts/{{RID}}/extensions"
62 );
63 get!(
64 doc: "Get the number of the resource",
65 name: get_extensions_count,
66 path: "/contacts/{{RID}}/extensions/$count"
67 );
68 delete!(
69 doc: "Delete navigation property extensions for users",
70 name: delete_extensions,
71 path: "/contacts/{{RID}}/extensions/{{id}}",
72 params: extension_id
73 );
74 get!(
75 doc: "Get extensions from users",
76 name: get_extensions,
77 path: "/contacts/{{RID}}/extensions/{{id}}",
78 params: extension_id
79 );
80 patch!(
81 doc: "Update the navigation property extensions in users",
82 name: update_extensions,
83 path: "/contacts/{{RID}}/extensions/{{id}}",
84 body: true,
85 params: extension_id
86 );
87 get!(
88 doc: "Get photo from users",
89 name: get_photo,
90 path: "/contacts/{{RID}}/photo"
91 );
92 patch!(
93 doc: "Update the navigation property photo in users",
94 name: update_photo,
95 path: "/contacts/{{RID}}/photo",
96 body: true
97 );
98 get!(
99 doc: "Get media content for the navigation property photo from users",
100 name: get_photo_content,
101 path: "/contacts/{{RID}}/photo/$value"
102 );
103 put!(
104 doc: "Update media content for the navigation property photo in users",
105 name: update_photo_content,
106 path: "/contacts/{{RID}}/photo/$value",
107 body: true
108 );
109}