Struct zohohorrorshow::client::ZohoClient
source · pub struct ZohoClient { /* private fields */ }
Expand description
ZohoClient initialises and manages the details with which we can make a connection to the Zoho API. It holds the information required which is then passed down into the various ModelRequests for use with a specific endpoint.
Implementations§
source§impl ZohoClient
impl ZohoClient
sourcepub fn new(client_id: &str, client_secret: &str) -> Self
pub fn new(client_id: &str, client_secret: &str) -> Self
Generate new ZohoClient which may be used to make requests
sourcepub fn access_token(&self) -> String
pub fn access_token(&self) -> String
sourcepub fn set_portal(self, portal_name: &str) -> Result<Self>
pub fn set_portal(self, portal_name: &str) -> Result<Self>
Set the Portal to which this ZohoClient should make requests. This takes a Portal name; these are typically human-friendly strings and should be known by the Zoho Portal users.
sourcepub fn set_project(self, project_name: &str) -> Result<Self>
pub fn set_project(self, project_name: &str) -> Result<Self>
Set the Project to which this ZohoClient should refer when making requests. All entities requested will be within this Project; if multiple Projects are to be queried this can be called a second time to re-use the client. The Project names are typically human-friendly strings and should be known by the Zoho Project users.
sourcepub fn activities(&self) -> ActivityRequest
pub fn activities(&self) -> ActivityRequest
Construct a Request for retrieving multiple Activities. Activities cannot be requested singly, therefore there is no id-parameterised counterpart.
sourcepub fn bug(&self, id: i64) -> BugRequest
pub fn bug(&self, id: i64) -> BugRequest
Construct a Request for retrieving a Bug by numeric ID
sourcepub fn bugs(&self) -> BugRequest
pub fn bugs(&self) -> BugRequest
Construct a Request for retrieving multiple Bugs
sourcepub fn category(&self, id: i64) -> CategoryRequest
pub fn category(&self, id: i64) -> CategoryRequest
Construct a Request for retrieving a Category by ID
sourcepub fn categories(&self) -> CategoryRequest
pub fn categories(&self) -> CategoryRequest
Construct a Request for retrieving multiple Categories
sourcepub fn event(&self, id: i64) -> EventRequest
pub fn event(&self, id: i64) -> EventRequest
Construct a Request for retrieving an Event by ID
sourcepub fn events(&self) -> EventRequest
pub fn events(&self) -> EventRequest
Construct a Request for retrieving multiple Events
sourcepub fn forum(&self, id: i64) -> ForumRequest
pub fn forum(&self, id: i64) -> ForumRequest
Construct a Request for retrieving a Forum by ID
sourcepub fn forums(&self) -> ForumRequest
pub fn forums(&self) -> ForumRequest
Construct a Request for retrieving multiple Fora
sourcepub fn forum_comment(&self, forum_id: i64, id: i64) -> CommentRequest
pub fn forum_comment(&self, forum_id: i64, id: i64) -> CommentRequest
Construct a Request for retrieving a Comment within a Forum, referencing the ID of both the Forum and Comment
sourcepub fn forum_comments(&self, forum_id: i64) -> CommentRequest
pub fn forum_comments(&self, forum_id: i64) -> CommentRequest
Construct a Request for retrieving multiple Comments within a Forum, referencing the Forum ID
sourcepub fn milestone(&self, id: i64) -> MilestoneRequest
pub fn milestone(&self, id: i64) -> MilestoneRequest
Construct a Request for retrieving a Milestone by ID
sourcepub fn milestones(&self) -> MilestoneRequest
pub fn milestones(&self) -> MilestoneRequest
Construct a Request for retrieving multiple Milestones
sourcepub fn portals(&self) -> PortalRequest
pub fn portals(&self) -> PortalRequest
Construct a Request for retrieving the available Portals for this Client. Used when initializing a new Client.
sourcepub fn portal_users(&self) -> PortalUserRequest
pub fn portal_users(&self) -> PortalUserRequest
Construct a Request for retrieving the users with access to this Client’s Portal.
sourcepub fn project(&self, id: i64) -> ProjectRequest
pub fn project(&self, id: i64) -> ProjectRequest
Construct a Request for retrieving a Project by ID
sourcepub fn projects(&self) -> ProjectRequest
pub fn projects(&self) -> ProjectRequest
Construct a Request for retrieving multiple Projects
sourcepub fn project_users(&self) -> ProjectUserRequest
pub fn project_users(&self) -> ProjectUserRequest
Construct a Request for retrieving the Users with access to this Client’s Project
sourcepub fn statuses(&self) -> StatusRequest
pub fn statuses(&self) -> StatusRequest
Construct a Request for retrieving multiple Statuses. There is no singular counterpart.
sourcepub fn task(&self, id: i64) -> TaskRequest
pub fn task(&self, id: i64) -> TaskRequest
Construct a Request for retrieving a Task by ID
sourcepub fn tasks(&self) -> TaskRequest
pub fn tasks(&self) -> TaskRequest
Construct a Request for retrieving multiple Tasks
sourcepub fn tasklist(&self, id: i64) -> TasklistRequest
pub fn tasklist(&self, id: i64) -> TasklistRequest
Construct a Request for retrieving a Tasklist by ID
sourcepub fn tasklists(&self) -> TasklistRequest
pub fn tasklists(&self) -> TasklistRequest
Construct a Request for retrieving multiple Tasklists
sourcepub fn tasklist_task(&self, tasklist_id: usize, id: i64) -> TasklistTaskRequest
pub fn tasklist_task(&self, tasklist_id: usize, id: i64) -> TasklistTaskRequest
Construct a Request for retrieving a Task belonging to a specific Tasklist
sourcepub fn tasklist_tasks(&self, tasklist_id: usize) -> TasklistTaskRequest
pub fn tasklist_tasks(&self, tasklist_id: usize) -> TasklistTaskRequest
Construct a Request for retrieving Tasks belonging to a specific Tasklist
sourcepub fn timesheet(&self, id: i64) -> TimesheetRequest
pub fn timesheet(&self, id: i64) -> TimesheetRequest
Construct a Request for retrieving a Timesheet by ID
sourcepub fn timesheets(&self) -> TimesheetRequest
pub fn timesheets(&self) -> TimesheetRequest
Construct a Request for retrieving multiple Timesheets
Trait Implementations§
source§impl Clone for ZohoClient
impl Clone for ZohoClient
source§fn clone(&self) -> ZohoClient
fn clone(&self) -> ZohoClient
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more