Commits

lfoust committed 750ca71

Made breaking changes to network methods spelled out here: http://stackapps.com/questions/2960/name-changes-for-a-few-methods

Comments (0)

Files changed (3)

trunk/source/Stacky.Net35/StackyClient/NetworkMethods.cs

         /// <summary>
         /// See: http://api.stackexchange.com/docs/read-access-tokens
         /// </summary>
-        public IPagedList<AccessToken> ReadAccessTokens(IEnumerable<string> tokens, Options options)
+        public IPagedList<AccessToken> GetAccessTokens(IEnumerable<string> tokens, Options options)
         {
-            var response = MakeRequest<AccessToken>("access-tokens", new string[] { tokens.Vectorize(), "read" }, new
+            var response = MakeRequest<AccessToken>("access-tokens", new string[] { tokens.Vectorize() }, new
             {
                 page = options.Page ?? null,
                 pagesize = options.PageSize ?? null,
         /// </summary>
         public AccessToken ReadAccessToken(string token, Options options)
         {
-            return ReadAccessTokens(new string[] { token }, options).FirstOrDefault();
+            return GetAccessTokens(new string[] { token }, options).FirstOrDefault();
         }
 
         /// <summary>
         /// </summary>
         public Filter CreateFilter(IEnumerable<string> include, IEnumerable<string> exclude, string baseFilter, bool? isUnsafe)
         {
-            var response = MakeRequest<Filter>("similar", null, new
+            var response = MakeRequest<Filter>("filter/create", null, new
             {
                 include = TryVectorize(include),
                 exclude = TryVectorize(exclude),
         /// </summary>
         public IEnumerable<Filter> GetFilters(IEnumerable<string> filters, string filter)
         {
-            var response = MakeRequest<Filter>("similar", new string[] { filters.Vectorize() }, new
+            var response = MakeRequest<Filter>("filters", new string[] { filters.Vectorize() }, new
             {
                 filter = filter
             });

trunk/source/Stacky/StackyClient/NetworkMethods.cs

         /// <summary>
         /// See: http://api.stackexchange.com/docs/read-access-tokens
         /// </summary>
-        public IPagedList<AccessToken> ReadAccessTokens(IEnumerable<string> tokens, int? page = null, int? pageSize = null, string filter = null)
+        public IPagedList<AccessToken> GetAccessTokens(IEnumerable<string> tokens, int? page = null, int? pageSize = null, string filter = null)
         {
-            var response = MakeRequest<AccessToken>("access-tokens", new string[] { tokens.Vectorize(), "read" }, new
+            var response = MakeRequest<AccessToken>("access-tokens", new string[] { tokens.Vectorize() }, new
             {
                 page = page,
                 pagesize = pageSize,
         /// <summary>
         /// See: http://api.stackexchange.com/docs/read-access-tokens
         /// </summary>
-        public AccessToken ReadAccessToken(string token, int? page = null, int? pageSize = null, string filter = null)
+        public AccessToken GetAccessToken(string token, int? page = null, int? pageSize = null, string filter = null)
         {
-            return ReadAccessTokens(new string[] { token }, page, pageSize, filter).FirstOrDefault();
+            return GetAccessTokens(new string[] { token }, page, pageSize, filter).FirstOrDefault();
         }
 
         /// <summary>
         /// </summary>
         public Filter CreateFilter(IEnumerable<string> include, IEnumerable<string> exclude, string baseFilter = null, bool? isUnsafe = null)
         {
-            var response = MakeRequest<Filter>("similar", null, new
+            var response = MakeRequest<Filter>("filters/create", null, new
             {
                 include = TryVectorize(include),
                 exclude = TryVectorize(exclude),
         /// </summary>
         public IEnumerable<Filter> GetFilters(IEnumerable<string> filters, string filter = null)
         {
-            var response = MakeRequest<Filter>("similar", new string[] { filters.Vectorize() }, new
+            var response = MakeRequest<Filter>("filter", new string[] { filters.Vectorize() }, new
             {
                 filter = filter
             });

trunk/source/Stacky/StackyClientAsync/NetworkMethods.cs

         /// <summary>
         /// See: http://api.stackexchange.com/docs/read-access-tokens
         /// </summary>
-        public void ReadAccessTokens(IEnumerable<string> tokens, Action<IPagedList<AccessToken>> onSuccess, Action<ApiException> onError = null, 
+        public void GetAccessTokens(IEnumerable<string> tokens, Action<IPagedList<AccessToken>> onSuccess, Action<ApiException> onError = null, 
             int? page = null, int? pageSize = null, string filter = null)
         {
-            MakeRequest<AccessToken>("access-tokens", new string[] { tokens.Vectorize(), "read" }, new
+            MakeRequest<AccessToken>("access-tokens", new string[] { tokens.Vectorize() }, new
             {
                 page = page,
                 pagesize = pageSize,
         /// <summary>
         /// See: http://api.stackexchange.com/docs/read-access-tokens
         /// </summary>
-        public void ReadAccessToken(string token, Action<AccessToken> onSuccess, Action<ApiException> onError = null, 
+        public void GetAccessToken(string token, Action<AccessToken> onSuccess, Action<ApiException> onError = null, 
             int? page = null, int? pageSize = null, string filter = null)
         {
-            ReadAccessTokens(new string[] { token }, items => onSuccess(items.FirstOrDefault()), onError, page, pageSize, filter);
+            GetAccessTokens(new string[] { token }, items => onSuccess(items.FirstOrDefault()), onError, page, pageSize, filter);
         }
 
         /// <summary>
         public void CreateFilter(IEnumerable<string> include, IEnumerable<string> exclude, Action<Filter> onSuccess, Action<ApiException> onError = null,
             string baseFilter = null, bool? isUnsafe = null)
         {
-            MakeRequest<Filter>("similar", null, new
+            MakeRequest<Filter>("filters/create", null, new
             {
                 include = TryVectorize(include),
                 exclude = TryVectorize(exclude),
         /// </summary>
         public void GetFilters(IEnumerable<string> filters, Action<IEnumerable<Filter>> onSuccess, Action<ApiException> onError = null, string filter = null)
         {
-            MakeRequest<Filter>("similar", new string[] { filters.Vectorize() }, new
+            MakeRequest<Filter>("filters", new string[] { filters.Vectorize() }, new
             {
                 filter = filter
             }, response => onSuccess(response.Items), onError);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.