@@ -330,6 +330,61 @@ def pro_domain(self, domain):
330
330
data = self ._call (self .host , end_point , params , self .secret )
331
331
return data ['data' ]['bitly_pro_domain' ]
332
332
333
+ def highvalue (self , limit = 10 , lang = 'en' ):
334
+ params = dict (lang = lang )
335
+ data = self ._call_oauth2_metrics ("v3/highvalue" , params , limit = limit )
336
+ return data
337
+
338
+ def realtime_bursting_phrases (self ):
339
+ data = self ._call_oauth2_metrics ("v3/realtime/bursting_phrases" , dict ())
340
+ return data ["phrases" ]
341
+
342
+ def realtime_hot_phrases (self ):
343
+ data = self ._call_oauth2_metrics ("v3/realtime/hot_phrases" , dict ())
344
+ return data ["phrases" ]
345
+
346
+ def realtime_clickrate (self , phrase ):
347
+ params = dict (phrase = phrase )
348
+ data = self ._call_oauth2_metrics ("v3/realtime/clickrate" , params )
349
+ return data ["rate" ]
350
+
351
+ def link_info (self , link ):
352
+ params = dict (link = link )
353
+ data = self ._call_oauth2_metrics ("v3/link/info" , params )
354
+ return data
355
+
356
+ def link_content (self , link , content_type = "html" ):
357
+ params = dict (link = link , content_type = content_type )
358
+ data = self ._call_oauth2_metrics ("v3/link/content" , params )
359
+ return data ["content" ]
360
+
361
+ def link_category (self , link ):
362
+ params = dict (link = link )
363
+ data = self ._call_oauth2_metrics ("v3/link/category" , params )
364
+ return data ["categories" ]
365
+
366
+ def link_social (self , link ):
367
+ params = dict (link = link )
368
+ data = self ._call_oauth2_metrics ("v3/link/social" , params )
369
+ return data ["social_scores" ]
370
+
371
+ def link_location (self , link ):
372
+ params = dict (link = link )
373
+ data = self ._call_oauth2_metrics ("v3/link/location" , params )
374
+ return data ["locations" ]
375
+
376
+ def link_language (self , link ):
377
+ params = dict (link = link )
378
+ data = self ._call_oauth2_metrics ("v3/link/language" , params )
379
+ return data ["languages" ]
380
+
381
+ #TODO - Incomplete
382
+ def search (self , query , offset = None , cities = None , domain = None , fields = None , limit = 10 , lang = 'en' ):
383
+ params = dict (query = query , offset = offset , cities = cities , domain = domain ,
384
+ fields = fields , lang = lang )
385
+ data = self ._call_oauth2_metrics ("v3/search" , params , limit = limit )
386
+ return data ['results' ]
387
+
333
388
@classmethod
334
389
def _generateSignature (self , params , secret ):
335
390
if not params or not secret :
@@ -425,4 +480,3 @@ def _call(self, host, method, params, secret=None, timeout=5000):
425
480
raise
426
481
except Exception :
427
482
raise BitlyError (None , sys .exc_info ()[1 ])
428
-
0 commit comments