Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

turn off entities fpr lookup-user

  • Loading branch information...
commit 8ff7f241adc4f5f834d75793c46faf0d412d6b56 1 parent 2d335ed
fons haffmans authored October 31, 2011
4  api/twitter-cache.lisp
@@ -71,8 +71,8 @@
71 71
        (setf (gethash (twitter-user-screen-name user) (twitter-object-cache 'twitter-user)) user)
72 72
        (db-store-object user lisprec))))
73 73
 
74  
-(defmacro drop-cache (type) 
75  
-  `(remhash (quote ,type) *twitter-object-cache*))
  74
+(defun drop-cache (type) 
  75
+  (remhash  type *twitter-object-cache*))
76 76
 
77 77
 (defmethod lookup-twitter-object ((ref (eql 'twitter-user)) (lisprec cons))
78 78
     (let ((name (cl-twitter::get-value :screen-name lisprec)))
5  api/twitter-user.lisp
@@ -173,7 +173,10 @@
173 173
 (define-twitter-method show-user       ((screen-name) &key (user-id nil)     (include-entities t)) :users/show :screen_name)
174 174
 (define-twitter-method show-user-by-id ((user-id)     &key (screen-name nil) (include-entities t)) :users/show :user_id)
175 175
 ;; probably should built in some resiliency in that the user can pass in a list ??
176  
-(define-twitter-method lookup-users    ((screen-name) &key (user-id nil)     (include-entities t)) :users/lookup :screen-name)
  176
+;; keep entities turned off until you can handle this in the object creation.
  177
+;; i see that if an other user is mentioned in the tweets, the entities will contain those ids and those are comming back decoded (i.e as the response)
  178
+;; maybe that's a feature !!
  179
+(define-twitter-method lookup-users    ((screen-name) &key (user-id nil)     (include-entities nil)) :users/lookup :screen-name)
177 180
 ;; does the query need to be url encoded ????
178 181
 ;; used url-rewrite for encoding; gets same result set as twitter for simple name queries..
179 182
 (define-twitter-method search-users    ((query) &key (per-page nil) (page nil) (include-entities t) ) :users/search :q )
4  db/mongodb-driver.lisp
@@ -50,7 +50,7 @@
50 50
     (nreverse lst)))
51 51
 
52 52
 (defun decode-to-hash-table (lst)
53  
-  (let ((ht (make-hash-table :test 'equal)))
  53
+   (let ((ht (make-hash-table :test 'equal)))
54 54
     (labels ((assocp (lst)
55 55
 	       (and (consp lst) (consp (car lst)) (symbolp (car (car lst)))))
56 56
 	     (item-listp (lst)
@@ -68,7 +68,7 @@
68 68
 	      (t	                                      (add (car el) (cdr el)))))
69 69
       ht)))
70 70
 
71  
-;; IMPORTANT : use 'safe mode' i.e chech get-last-error before continuing....
  71
+;; IMPORTANT : use 'safe mode' i.e check get-last-error before continuing....
72 72
 
73 73
 (defmacro store-twitter-object (type)
74 74
  `(progn 

0 notes on commit 8ff7f24

Please sign in to comment.
Something went wrong with that request. Please try again.