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

added findsavedsearchname() returns the names of all your saved searches

  • Loading branch information
mnuyens committed Jun 6, 2012
commit 25792476e11236af1c55cbd5d4c62dfd9fffe8b3
@@ -104,7 +104,7 @@ def facets(self, q='*', facetby='date', **kwargs):
return self._api_help('api/facets/%s' % facetby, kwargs)

@time_translate
def savedsearch(self,q="",**_kwargs):
def savedsearch(self,q=""):
"""
Runs one of your saved searches
"""
@@ -137,7 +137,13 @@ def savedsearch(self,q="",**_kwargs):
devices+=" OR ip:"+x
devices+=")"
return self.search(q=params['terms']+inputs+devices,**opts)

def findsavedsearchnames(self):
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)
names=[for _ in content['name']]
return names


def create_input(self, name, service='syslogudp', description='',
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.