1- //! this Api is used to to get instagram business account needed to any give facebook page
1+ //! This Api is used to get instagram business account for any given facebook page
22//! <https://developers.facebook.com/docs/instagram-api/reference/page>
33
44use seed:: fetch:: fetch;
@@ -35,7 +35,7 @@ impl InstagramApi {
3535 }
3636 }
3737
38- /// this method get the instagram business account id.
38+ /// This method is use to get instagram business account id.
3939 /// for reference check <https://developers.facebook.com/docs/instagram-api/reference/page>
4040 pub async fn account_id ( self ) -> seed:: fetch:: Result < InstaAccount > {
4141 let base_url = self . base_url . replace ( "EDGE" , "?" ) ;
@@ -48,7 +48,7 @@ impl InstagramApi {
4848 fetch ( request) . await ?. json :: < InstaAccount > ( ) . await
4949 }
5050
51- /// this method get the instagram business account with its details.
51+ /// This method is used to get instagram business account with its details (name, user, id ,etc) .
5252 /// for reference check <https://developers.facebook.com/docs/instagram-api/reference/ig-user>
5353 pub async fn account_details ( self ) -> seed:: fetch:: Result < InstagramAccount > {
5454 let base_url = "https://graph.facebook.com/v11.0/" ;
@@ -117,7 +117,7 @@ pub struct InstagramAccount {
117117 ///This is not a public fields, which means it may be returned depending on the user setting.
118118 pub media_count : u32 ,
119119
120- //This is not a public fields, which means it may be returned depending on the user setting.
120+ /// This is not a public fields, which means it may be returned depending on the user setting.
121121 pub name : String ,
122122
123123 //This is not a public fields, which means it may be returned depending on the user setting.
@@ -134,7 +134,7 @@ pub struct Fields {
134134}
135135
136136impl Default for Fields {
137- /// This parameters are used as fields which are passed in as a query
137+ /// These parameters are used as fields which are passed in as a query
138138 /// parameters to the get post request and feeds request
139139 fn default ( ) -> Self {
140140 let field_list = vec ! [
@@ -154,8 +154,3 @@ impl Default for Fields {
154154 Self { fields }
155155 }
156156}
157- // This is only used for serialize
158- /*#[allow(clippy::trivially_copy_pass_by_ref)]
159- fn is_undefined(num: String) -> bool {
160- *num ==
161- }*/
0 commit comments