Format
This commit is contained in:
parent
44eb0bcc57
commit
7349f305fb
|
@ -3,7 +3,7 @@ use quote::quote;
|
||||||
|
|
||||||
use crate::{generate::util, parser, types};
|
use crate::{generate::util, parser, types};
|
||||||
|
|
||||||
use super::{send_method_builder::SendMethodBuilder, return_type::create_return_type};
|
use super::{return_type::create_return_type, send_method_builder::SendMethodBuilder};
|
||||||
|
|
||||||
pub fn create_method_with_params(
|
pub fn create_method_with_params(
|
||||||
group: &parser::ApiGroup,
|
group: &parser::ApiGroup,
|
||||||
|
@ -28,7 +28,8 @@ pub fn create_method_with_params(
|
||||||
|
|
||||||
let group_name = util::to_ident(&group.name.to_camel());
|
let group_name = util::to_ident(&group.name.to_camel());
|
||||||
let send_builder =
|
let send_builder =
|
||||||
SendMethodBuilder::new(&util::to_ident("send"), url, quote! { self.group.auth }).with_form();
|
SendMethodBuilder::new(&util::to_ident("send"), url, quote! { self.group.auth })
|
||||||
|
.with_form();
|
||||||
|
|
||||||
let generate_send_impl = |send_method: proc_macro2::TokenStream| {
|
let generate_send_impl = |send_method: proc_macro2::TokenStream| {
|
||||||
let optional_params = generate_optional_params(params);
|
let optional_params = generate_optional_params(params);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use quote::quote;
|
use quote::quote;
|
||||||
|
|
||||||
use super::{send_method_builder::SendMethodBuilder, return_type::create_return_type};
|
use super::{return_type::create_return_type, send_method_builder::SendMethodBuilder};
|
||||||
use crate::parser;
|
use crate::parser;
|
||||||
|
|
||||||
pub fn create_method_without_params(
|
pub fn create_method_without_params(
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
mod send_method_builder;
|
|
||||||
mod method_with_params;
|
mod method_with_params;
|
||||||
mod method_without_params;
|
mod method_without_params;
|
||||||
mod return_type;
|
mod return_type;
|
||||||
|
mod send_method_builder;
|
||||||
|
|
||||||
use crate::{generate::util, parser};
|
use crate::{generate::util, parser};
|
||||||
use case::CaseExt;
|
use case::CaseExt;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user