File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 11using Stream . Rest ;
2+ using System . Collections . Generic ;
23
34namespace Stream . Models
45{
@@ -17,6 +18,8 @@ public class GetOptions
1718 private string _feed_slug = null ;
1819 private string _user_id = null ;
1920
21+ private IDictionary < string , string > _custom = null ;
22+
2023 public GetOptions WithOffset ( int offset )
2124 {
2225 _offset = offset ;
@@ -77,6 +80,17 @@ public GetOptions WithUserId(string userId)
7780 return this ;
7881 }
7982
83+ public GetOptions WithCustom ( string key , string value )
84+ {
85+ if ( _custom == null )
86+ {
87+ _custom = new Dictionary < string , string > ( ) ;
88+ }
89+
90+ _custom . Add ( key , value ) ;
91+ return this ;
92+ }
93+
8094 internal void Apply ( RestRequest request )
8195 {
8296 request . AddQueryParameter ( "offset" , _offset . ToString ( ) ) ;
@@ -97,6 +111,12 @@ internal void Apply(RestRequest request)
97111 if ( ! string . IsNullOrWhiteSpace ( _user_id ) )
98112 request . AddQueryParameter ( "user_id" , _user_id ) ;
99113
114+ if ( _custom != null )
115+ {
116+ foreach ( KeyValuePair < string , string > kvp in _custom )
117+ request . AddQueryParameter ( kvp . Key , kvp . Value ) ;
118+ }
119+
100120 _filter ? . Apply ( request ) ;
101121 _marker ? . Apply ( request ) ;
102122 _reaction ? . Apply ( request ) ;
You can’t perform that action at this time.
0 commit comments