File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 2
2
using System . Collections . Generic ;
3
3
using System . Linq ;
4
4
using System . Security . Authentication ;
5
- using System . Text . RegularExpressions ;
6
5
using System . Threading . Tasks ;
7
6
using System . Web ;
8
7
using Newtonsoft . Json ;
@@ -124,6 +123,9 @@ public Comment[] Comments
124
123
[ JsonProperty ( "title" ) ]
125
124
public string Title { get ; set ; }
126
125
126
+ [ JsonProperty ( "subreddit" ) ]
127
+ public string Subreddit { get ; set ; }
128
+
127
129
[ JsonProperty ( "url" ) ]
128
130
[ JsonConverter ( typeof ( UrlParser ) ) ]
129
131
public Uri Url { get ; set ; }
@@ -153,14 +155,6 @@ public Comment Comment(string message)
153
155
return new Comment ( ) . Init ( Reddit , json [ "json" ] [ "data" ] [ "things" ] [ 0 ] , WebAgent , this ) ;
154
156
}
155
157
156
- public string GetSubreddit ( )
157
- {
158
- Reddit reddit = new Reddit ( ) ;
159
- string substring = Permalink . ToString ( ) ;
160
- Match match = Regex . Match ( substring , @"/r/.*?(?=/)" ) ;
161
- return match . Value ;
162
- }
163
-
164
158
private string SimpleAction ( string endpoint )
165
159
{
166
160
if ( Reddit . User == null )
You can’t perform that action at this time.
0 commit comments