Struct diem_github_client::Client
source · pub struct Client { /* private fields */ }
Expand description
Client provides a client around the restful interface to GitHub API version 3. Learn more here: https://developer.github.com/v3
This is not intended for securely storing private data, though perhaps it could with a private repository. The tooling is intended to be used to exchange data in an authenticated fashion across multiple peers.
Implementations§
source§impl Client
impl Client
pub fn new( owner: String, repository: String, branch: String, token: String ) -> Self
sourcepub fn delete_file(&self, path: &str) -> Result<(), Error>
pub fn delete_file(&self, path: &str) -> Result<(), Error>
Delete a file from a GitHub repository
sourcepub fn delete_directory(&self, path: &str) -> Result<(), Error>
pub fn delete_directory(&self, path: &str) -> Result<(), Error>
Recursively delete all files, which as a by product will delete all folders
sourcepub fn get_branches(&self) -> Result<Vec<String>, Error>
pub fn get_branches(&self) -> Result<Vec<String>, Error>
Retrieve a list of branches, this is effectively a status check on the repository