aboutsummaryrefslogtreecommitdiff
path: root/sx-site.el
diff options
context:
space:
mode:
Diffstat (limited to 'sx-site.el')
-rw-r--r--sx-site.el52
1 files changed, 52 insertions, 0 deletions
diff --git a/sx-site.el b/sx-site.el
new file mode 100644
index 0000000..3c326e4
--- /dev/null
+++ b/sx-site.el
@@ -0,0 +1,52 @@
+;;; sx-site.el --- browsing sites -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2014 Sean Allred
+
+;; Author: Sean Allred <code@seanallred.com>
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;
+
+;;; Code:
+
+(require 'sx-method)
+
+(defvar sx-site-browse-filter
+ '((.backoff
+ .error_id
+ .error_message
+ .error_name
+ .has_more
+ .items
+ .quota_max
+ .quota_remaining
+ site.site_type
+ site.name
+ site.site_url
+ site.api_site_parameter)
+ nil
+ none))
+
+(defun sx-site-get-sites ()
+ (sx-method-call "sites" nil sx-site-browse-filter))
+
+(provide 'sx-site)
+;;; stack-site.el ends here
+
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; End: