Update style of client strings.

(imported from commit 1516461cf53b2715de68e01f16bb8a8cc33c48ad)
This commit is contained in:
Luke Faraone 2013-12-06 17:50:55 -05:00
parent a1cf1f04a2
commit c03ac5e3ce
16 changed files with 17 additions and 15 deletions

View file

@ -49,7 +49,7 @@ At the top of the file:
# Make sure the Zulip API distribution's root directory is in sys.path, then:
import zulip
zulip_client = zulip.Client(email="your-bot@example.com")
zulip_client = zulip.Client(email="your-bot@example.com", client="MyTestClient/0.1")
When you want to send a message:

View file

@ -43,7 +43,7 @@ zulip_client = zulip.Client(
email=zulip_user,
api_key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
verbose=True,
client="test: Zulip monitoring",
client="ZulipMonitoring/0.1",
site=options.site)
# Configure logging

View file

@ -10,7 +10,7 @@ import unicodedata
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'api'))
import zulip
zulip_client = zulip.Client()
zulip_client = zulip.Client(client="ZulipSyncPublicStreamsBot/0.1")
def fetch_public_streams():
public_streams = set()

View file

@ -49,6 +49,7 @@ sys.path.append(zulip_directory)
import zulip
client = zulip.Client(
client = "ZulipTddiumNotifier/0.1",
email = os.environ['ZULIP_USER'],
api_key = os.environ.get('ZULIP_API_KEY'))

View file

@ -48,7 +48,7 @@ else:
logging.basicConfig(level=logging.INFO)
client = zulip.Client(email=config.ZULIP_USER, api_key=config.ZULIP_API_KEY,
site=config.ZULIP_SITE, client="asana " + VERSION)
site=config.ZULIP_SITE, client="ZulipAsana/" + VERSION)
def fetch_from_asana(path):
"""

View file

@ -48,7 +48,7 @@ client = zulip.Client(
email=config.ZULIP_USER,
site=config.ZULIP_SITE,
api_key=config.ZULIP_API_KEY,
client="basecamp " + VERSION)
client="ZulipBasecamp/" + VERSION)
user_agent = "Basecamp To Zulip Mirroring script (support@zulip.com)"
htmlParser = HTMLParser()

View file

@ -51,7 +51,7 @@ client = zulip.Client(
email=config.ZULIP_USER,
site=config.ZULIP_SITE,
api_key=config.ZULIP_API_KEY,
client="codebase " + VERSION)
client="ZulipCodebase/" + VERSION)
user_agent = "Codebase To Zulip Mirroring script (support@zulip.com)"
# find some form of JSON loader/dumper, with a preference order for speed.

View file

@ -46,7 +46,7 @@ client = zulip.Client(
email=config.ZULIP_USER,
site=config.ZULIP_SITE,
api_key=config.ZULIP_API_KEY,
client="git " + VERSION)
client="ZulipGit/" + VERSION)
# check_output is backported from subprocess.py in Python 2.7
def check_output(*popenargs, **kwargs):

View file

@ -87,7 +87,7 @@ def send_zulip(email, api_key, site, stream, subject, content):
"""
client = zulip.Client(email=email, api_key=api_key,
site=site,
client="mercurial " + VERSION)
client="ZulipMercurial/" + VERSION)
message_data = {
"type": "stream",

View file

@ -15,7 +15,7 @@ for opt in ('type', 'host', 'service', 'state'):
parser.add_option('--' + opt)
(opts, args) = parser.parse_args()
client = zulip.Client(config_file=opts.config, client="nagios " + VERSION)
client = zulip.Client(config_file=opts.config, client="ZulipNagios/" + VERSION)
msg = dict(type='stream', to=opts.stream)

View file

@ -52,7 +52,8 @@ import zulip
client = zulip.Client(
email=config.ZULIP_USER,
site=config.ZULIP_SITE,
api_key=config.ZULIP_API_KEY)
api_key=config.ZULIP_API_KEY,
client="ZulipPerforce/" + __version__)
try:
changelist = int(sys.argv[1])

View file

@ -164,7 +164,7 @@ except IOError:
log_error_and_exit("Unable to read feed file at %s." % (opts.feed_file,))
client = zulip.Client(email=opts.email, api_key=opts.api_key,
site=opts.site, client="rss " + VERSION)
site=opts.site, client="ZulipRSS/" + VERSION)
first_message = True

View file

@ -46,7 +46,7 @@ client = zulip.Client(
email=config.ZULIP_USER,
site=config.ZULIP_SITE,
api_key=config.ZULIP_API_KEY,
client="svn " + VERSION)
client="ZulipSVN/" + VERSION)
svn = pysvn.Client()
path, rev = sys.argv[1:]

View file

@ -50,7 +50,7 @@ client = zulip.Client(
email=config.ZULIP_USER,
site=config.ZULIP_SITE,
api_key=config.ZULIP_API_KEY,
client="trac " + VERSION)
client="ZulipTrac/" + VERSION)
def markdown_ticket_url(ticket, heading="ticket"):
return "[%s #%s](%s/%s)" % (heading, ticket.id, config.TRAC_BASE_TICKET_URL, ticket.id)

View file

@ -129,7 +129,7 @@ client = zulip.Client(
email=options.email,
api_key=options.api_key,
site=options.site,
client="twitter " + VERSION,
client="ZulipTwitter/" + VERSION,
verbose=True)
if since_id < 0 or options.twitter_id != user_id:

View file

@ -146,7 +146,7 @@ client = zulip.Client(
email=opts.email,
api_key=opts.api_key,
site=opts.site,
client="twitter search " + VERSION,
client="ZulipTwitterSearch/" + VERSION,
verbose=True)
search_query = " OR ".join(opts.search_terms.split(","))