Getting the public access URL for a FogBugz case that was emailed in - fogbugz

We have FogBUGZ installed on FogBugz On Demand. I occasionally need to send an email containing a list of cases that were submitted via email to the person who originally submitted them. For this I would like to supply the original public access url that they would have received in the original cnofirmation email.
However I cannot seem to find that URL anywhere in the web interface. Is there an easy way to find these urls?

we are doing a similar thing but with local Fogbugz.
This is what we do:
1. Call fogbugz API to get a list of cases
2. Store case numbers in a variable
3. Construct url links like this http://yourUrl/default.asp?insertCaseNumberHere
Hope this helps.

According to this answer https://stackoverflow.com/a/666225/3901618 you can get the public tickets for the selected cases (in this example filtered by a correspondent) using the following api call:
https://test.fogbugz.com/api.asp?cmd=search&q=correspondent:xyz#xyz.com&cols=ixBug,correspondent,sTicket,sTitle,dtOpened&token=123456789
where sTicket is
the ticket for a case, which can be turned into a public ticket URL
Source: http://help.fogcreek.com/8202/xml-api
The response looks like this:
<case operations="edit,reopen,reply,forward,remind" ixBug="455">
<ixBug>5455</ixBug>
<sTicket>
<![CDATA[5455_fq856r9ks6qr2rv9]]>
</sTicket>
<sTitle>
<![CDATA[Title]]>
</sTitle>
<dtOpened>2013-03-06T14:33:32Z</dtOpened>
</case>
and then you can build the following URL:
https://test.fogbugz.com/default.asp?5455_fq856r9ks6qr2rv9

Related

How to get to invoice link in invoices api

I am interested to have a invoice link/pdf from the api which returns the invoice using new freshbooks api endpoint https://api.freshbooks.com/accounting/account/<accountid>/invoices/<invoiceid>
Even including direct_links I am unable to get the link to the invoice. With direct_links it returns json with fields id, contactid, created_date, type, userid, objectid, token.
I currently work at FreshBooks.
Unfortunately these direct link tokens will only work with old FreshBooks, which isn't mentioned in the documentation -- I'll see if we can fix that.
Poking through, it doesn't look like we've has exposed a way to access a PDF version of the invoice through the public API just yet. But I'll pass that on to the appropriate channels and I'll update this answer if that changes.

Can you upload a file to the Slack API using files.upload as a different user?

I'm trying to find a way to have an application post a text snippet to our support channel through the Slack API. Using the files.upload method, I can create a text snippet and share it with the channel, but the post appears to come from me (because the token used to authenticate the request is mine).
I'm looking for a way to do this, but make it appear with a custom user name and icon, like you can with the chat.postMessage method's username and icon_url parameters. Is there a way to achieve this?
There are two ways.
Way 1. - If you only want to upload in a channel and don't need to listen to any conversation, then you can use incoming-webhooks. And then override the username and icon. Read "Customizing your username and icon" in Here.
Way 2 - You can create a bot user and let the bot user type post this message for you. I guess right now you are using test tokens generated by Slack so you are getting your name only. But if you use bot-user then you can use custom Name and icon_url for your bot.
I hope this answers your question.
Yes, as #Abhinav Rai suggested, you need have bot. Slack support just answered me the same question.
To upload files as a bot you'll need to create an associated 'bot user' and post the file using the bot's token: https://api.slack.com/bot-users — all files must be owned by a user account and the bot user will fill this requirement.
There is a way 3 which uses the username function from chat.postMessage function. Follow this -
import slack
import json
import os
def pureimg(data1):
data1 = '[{"text": "", "image_url": "'+data1+'"}]'
data1 = [json.loads(data1[1:-1])]
return data1
#This function will make the image url to correct format.
slacker = slack.WebClient(token='your-token-here')
payoff=os.path.join(os.path.dirname(os.path.realpath(__file__)), 'filename.png')
#It gives cross OS compatibility on filepath.
response=slacker.files_upload(channel='#theta',file=payoff)
payoff=response['file']['permalink']
#First We upload the local file to Slack and fetch permalink.
#If you do not have any local file just put the external image URL in the payoff.
response=slacker.chat_postMessage(channel='#channel_name', text="Sample Text", username='Bot name', attachments=pureimg(payoff), icon_emoji=':emoji:')
#Then, We post to Slack Channel as a bot!

verifying a single attendee with email

Is there a method to return a specific attendee's information by sending:
1) the attendee's email address
2) my user_key
3) my app_key
I could do this by searching the returned xml from this "event_list_attendees" method, however, I would prefer to only receive the one result (not hundreds for each call).
Note: I work on the platform team at Eventbrite
Currently there is no way to search for a specific attendee with event_list_attendees.
However, you can cut down on the amount of data returned by paging through the results until you have found the attendee or using the modified_after parameter if you know when the user was last updated: http://developer.eventbrite.com/doc/events/event_list_attendees/
I realize this limitation is non-ideal. We're actively working on building a new API which is more RESTful and does not have issues like this.

how do you get multiple Twitter names using api querystring

HI,how do i get multiple twitter name using API querystring,exmaple i need to populate related with the name of 'john'.how can i do that here i have one example below 'http://search.twitter.com/search.atom?q=from%3Ajohn' by this example we can see only particular user name only but i want related name.Kindly let me know ASAP.
You can use the OR operator...
http://search.twitter.com/search.atom?q=from%3ADWRoelands+OR+from%3AJohn

how do i get multiple twitter name using API querystring?

HI,how do i get multiple twitter name using API querystring,exmaple i need to populate related with the name of 'john'.how can i do that here i have one example below
'http://search.twitter.com/search.atom?q=from%3Ajohn' by this example we can see only particular user name only but i want related name.Kindly let me know ASAP.
You can use the OR operator...
http://search.twitter.com/search.atom?q=from%3ADWRoelands+OR+from%3AJohn

Resources