@@ -90,28 +90,28 @@ func Test_ListUsersInput_ResolveEndpoint(t *testing.T) {
9090 expect : endpointRoot + "test-id" + "?expansions=ex1%2Cex2" ,
9191 },
9292 {
93- name : "with media.fields " ,
93+ name : "with max_results " ,
9494 params : & types.ListUsersInput {
95- ID : "test-id" ,
96- MediaFields : fields. MediaFieldList { "tf1" , "tf2" } ,
95+ ID : "test-id" ,
96+ MaxResults : types . ListUsersMaxResults ( 42 ) ,
9797 },
98- expect : endpointRoot + "test-id" + "?media.fields=tf1%2Ctf2 " ,
98+ expect : endpointRoot + "test-id" + "?max_results=42 " ,
9999 },
100100 {
101- name : "with place.fields " ,
101+ name : "with invalid max_results " ,
102102 params : & types.ListUsersInput {
103- ID : "test-id" ,
104- PlaceFields : fields. PlaceFieldList { "tf1" , "tf2" } ,
103+ ID : "test-id" ,
104+ MaxResults : types . ListUsersMaxResults ( 5000 ) ,
105105 },
106- expect : endpointRoot + "test-id" + "?place.fields=tf1%2Ctf2" ,
106+ expect : endpointRoot + "test-id" ,
107107 },
108108 {
109- name : "with poll.fields " ,
109+ name : "with pagination_token " ,
110110 params : & types.ListUsersInput {
111- ID : "test-id" ,
112- PollFields : fields. PollFieldList { "tf1" , "tf2" } ,
111+ ID : "test-id" ,
112+ PaginationToken : "p-token" ,
113113 },
114- expect : endpointRoot + "test-id" + "?poll.fields=tf1%2Ctf2 " ,
114+ expect : endpointRoot + "test-id" + "?pagination_token=p-token " ,
115115 },
116116 {
117117 name : "with tweets.fields" ,
@@ -132,15 +132,14 @@ func Test_ListUsersInput_ResolveEndpoint(t *testing.T) {
132132 {
133133 name : "all query parameters" ,
134134 params : & types.ListUsersInput {
135- ID : "test-id" ,
136- Expansions : fields.ExpansionList {"ex" },
137- MediaFields : fields.MediaFieldList {"mf" },
138- PlaceFields : fields.PlaceFieldList {"plf" },
139- PollFields : fields.PollFieldList {"pof" },
140- UserFields : fields.UserFieldList {"uf" },
141- TweetFields : fields.TweetFieldList {"tf" },
135+ ID : "test-id" ,
136+ Expansions : fields.ExpansionList {"ex" },
137+ MaxResults : types .ListUsersMaxResults (20 ),
138+ PaginationToken : "p-token" ,
139+ UserFields : fields.UserFieldList {"uf" },
140+ TweetFields : fields.TweetFieldList {"tf" },
142141 },
143- expect : endpointRoot + "test-id" + "?expansions=ex&media.fields=mf&place.fields=plf&poll.fields=pof &tweet.fields=tf&user.fields=uf" ,
142+ expect : endpointRoot + "test-id" + "?expansions=ex&max_results=20&pagination_token=p-token &tweet.fields=tf&user.fields=uf" ,
144143 },
145144 {
146145 name : "has no required parameter" ,
0 commit comments