Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

saved search added and tested #5

Open
wants to merge 10 commits into
base: master
from

saved search now works as intended

  • Loading branch information
mnuyens committed Jun 5, 2012
commit 575b48f744cf2aca5d6de8a20b6bc674c3a832f8
@@ -108,9 +108,10 @@ def savedsearch(self,q="",**_kwargs):
"""
Runs one of your saved searches
"""
query=Http(timeput=10)
resp, cont=query.request("http://"+self.subdomain+"loggly.com/api/savedsearches","GET")
content=json.loads(cont)
query=Http(timeout=10)
query.add_credentials(self.username,self.password)
resp, cont=query.request("http://"+self.subdomain+".loggly.com/api/savedsearches","GET")
content=loads(cont)
saved=None
for search in content:
if search['name']==q:
@@ -123,8 +124,8 @@ def savedsearch(self,q="",**_kwargs):
inputs=""
devices=""
for x in params:
if x!="content" and x!="inputs" and x!="devices":
opts[ssdict[x]]=params[x]
if x!="terms" and x!="inputs" and x!="devices":
opts[self.ssdict[x]]=params[x]
if params['inputs']:
inputs+=" AND (inputname:"+params['inputs'][0]
for x in params['inputs'].__iter__().next():
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.