I'm using TravelItineraryReadRQ to get information about Price Quotes in pnr. In some cases service response hides number sequences with ("XXXX") even if it was not credit card information. For example:
PQ creation commatnd: WPASU‡EDUFS123456‡FINVOICE*QUW12345‡RQ«
and here is what I get in response:
<tir39:PricedItinerary DisplayOnly="false" InputMessage="WPASU¥EDUFS1XXXX6¥FINVOICE*QUW1XXX5¥RQ" RPH="1" StatusCode="A" StoredDateTime="2018-12-21T09:13" TaxExempt="false" ValidatingCarrier="SU">
<tir39:AirItineraryPricingInfo>
<tir39:ItinTotalFare>
<tir39:BaseFare Amount="1980" CurrencyCode="RUB"/>
<tir39:Taxes>
<tir39:Tax Amount="2541" TaxCode="XT"/>
<tir39:TaxBreakdownCode TaxPaid="false">2265YQ</tir39:TaxBreakdownCode>
<tir39:TaxBreakdownCode TaxPaid="false">276RI</tir39:TaxBreakdownCode>
</tir39:Taxes>
<tir39:TotalFare Amount="4521" CurrencyCode="RUB"/>
<tir39:Totals>
<tir39:BaseFare Amount="1980"/>
<tir39:Taxes>
<tir39:Tax Amount="2541"/>
</tir39:Taxes>
<tir39:TotalFare Amount="4521"/>
</tir39:Totals>
</tir39:ItinTotalFare>
<tir39:PassengerTypeQuantity Code="ADT" Quantity="01"/>
<tir39:PTC_FareBreakdown>
<tir39:Endorsements>
<tir39:Endorsement type="PRICING_PARAMETER">
<tir39:Text>WPASU$EDUFS1XXXX6$FINVOICE*QUW1XXX5$RQ</tir39:Text>
</tir39:Endorsement>
Is there any way to get those numbers?
I believe Sabre has logic on their end due to GDPR requirements that masks credit card info from being viewed unless you have the CC in the correct form of payment field AND your EPR has the "CCVIEW" attribute assigned.
Essentially, Sabre doesn't want CC data stored anywhere but the secured Form of Payment field and they control who can and cannot see that data by using the EPR Keywords (the login info you get from Sabre).
So, for your example, my guess is that Sabre's regex or whatever they use to identify credit card data sees your strings in those fields, assumes they are CC numbers, and masks them. You may want to open a ticket with Sabre to address this, or as Andy K suggested above, try adding CCVIEW to that EPR (although I think that probably won't work).
Related
Using this, it is possible to take the badges from a specific user of Stack Overflow:
library(stackr)
badges <- stack_users(9371451, "badges", num_pages=100000, pagesize=100)
How can I add a parameter to take also the timestamp that the badge was awarded to the user? And if possible, for which answer?
you can use users/{ids}/timeline. See description page:
Returns a subset of the actions the users in {ids} have taken on the site.
This method returns users' posts, edits, and earned badges in the order they were accomplished.
library(stackr)
df_timeline <- stackr:::stack_GET("users/9371451/timeline", num_pages = 10000)
The ::: is necessary because the function stack_GET is an internal command
It is possible-ish with the Stack Exchange API, but not with the stackr library you are using.
The /users/{ids}/badges route returns a list of badge objects, which only has these possible properties:
award_count integer
badge_id integer, refers to a badge
badge_type one of named, or tag_based
description string
link string
name string
rank one of gold, silver, or bronze
user shallow_user
So you can't get the timestamp or triggering post there.
However, you can get this information (mostly) from the /notifications route, which can return results like:
{ "items": [ {
"site": {"site_url": "https://webmasters.stackexchange.com"},
"is_unread": false,
"creation_date": 1520234766,
"notification_type": "badge_earned",
"body": `You've earned the \"Notable Question\" badge for
<a href=\"http://webmasters.stackexchange.com/questions/65822\">
How to bulk delete email accounts from cPanel / my hosting account?</a>.`
// Manually wrapped for this post
},
etc.
But, important:
/notifications requires authentication and only works for a logged-in (via the API) user.
That stackr library does not support authentication. (See your previous question in a bit.)
/notifications returns all of a given user's Stack Exchange sites, so you will have to filter out the ones you are not interested in.
/notifications returns several kinds of notices, so you will have to filter out the ones that are not badge related.
/notifications does not return badge details like rank, so you will still need to call /users/{ids}/badges and marry the results.
For higher rep users, it is possible that you would exhaust your API quota before being able to fetch all of that user's notifications.
Let's say, I've joined TELEGRAM group...
I am just a typical member of GROUP (and thus, cant use any bots there.. ?) so, I am unable to find out the way, how to get GROUP ID.
New Update
Just Simply Forward a message from your channel to This Bot: (https://telegram.me/getidsbot)
Update
1: Goto (https://web.telegram.org)
2: Goto your Gorup and Find your link of Gorup(https://web.telegram.org/#/im?p=g154513121)
3: Copy That number after g and put a (-) Before That -154513121
4: Send Your Message to Gorup
bot.sendMessage(-154513121, "Hi")
I Tested Now and Work like a Charm
Node.js:
Try using TelegramBot#getChat():
bot.getChat("#channelusername").then(function(chat) {
// 'chat' is a Chat object
console.log(chat.id);
});
See API getChat() method and Chat object.
Hope that helps.
There is a unofficicl Plus Messenger client for Android users, and you can see ID in group/channel info.
Supergroup and Channel will looks like 1068773197, which is -1001068773197 for bots (with -100 prefix).
If you just want to obtain channel/user ID, forward message to #RawDataBot.
there are lots of ways to do so.
simplest one: download plus messenger which is a fork of telegram. it shows every channel's id in the about page of that channel.
https://play.google.com/store/apps/details?id=org.telegram.plus&hl=en
thanks to #Sean:
Supergroup and Channel will looks like 1068773197, which is -1001068773197 for bots (with -100 prefix).
Above method works for channels, for groups you may use this method:
Just forward a single message from that chat to #RawDataBot. it will reply you with a json data containing chatid.
via code:
If you are a member of a group, you should receive updates from that group when ever there is any activity from that group. The updates will contain a chats list-element from which you can get a Channel which has the following relevant fields:
id: group_id,
title: "the_group_title",
username: "group_username"
As of my experience ,there are two popular libraries,
python-Telethon --->Telegram Client Library(uses api_id,api_hash)
python-Telegram-bot ---->Telegram Bot (uses api token)
There are lot of ways to get the user_id ,group_id,channel_id .
To get the these ids use Telethon client library
from telethon import TelegramClient,sync
api_id="xxx" #get from telegram website
api_hash="yyy" #get from telegram website
client=TelegramClient(session_object,api_id,api_hash)
client.start()
#To get the channel_id,group_id,user_id
for chat in client.get_dialogs():
print('name:{0} ids:{1} is_user:{2} is_channel{3} is_group:{4}'.format(chat.name,chat.id,chat.is_user,chat.is_channel,chat.is_group))
That is all about, it will print name and id of channel,group,user.
Also, it will check wheather the id is belong to channel or group or user
generally, Channel id starts with negrative(eg:-1001109500936) starts with (-100)
group id is normal and starts with negative
user id starts with positve
Another way is to use 'plus messanger app'
To see all the group,channel,user id
Cheers
Another Simple Way,
client=TelegramClient(session,api_id,api_hash)
client.start()
destination_entity_name="Type User(may be bot) or group or channel name"
entity=client.get_entity(destination_entity_name)
print(entity.stringify()) #All paratmeters
print(entity.id) #user(bot also considered as user) or group
That should be obtainable using tg-messenger-cli: https://github.com/vysheng/tg I haven't had time to try it out yet but friend has made some automated messages for his daughter. Should be quite versatile.
After hours spent, I was able to find the ID of GROUPS using CuteGram app.
Open group there, and click "COPY" icon, that opens a folder, and in the address you will see the ID.
Invite your bot to your group
and use ur bot to text /myid
then use the GetUpdates api, you shall have your group ID
I want to customize the standard drill-down functionality and add a text parameter to the drill-down URL. I will then parse and use the parameter in the SysStartUpCmdDrillDown or EventDrillDownPoller class like the solution provided by Jan B. Kjeldsen in this question.
The standard drill-down link is dynamics://Target/?DrillDown_RecID/ :
dynamics://0/?DrillDown_5637230378/
In previous versions of AX it was possible to modify the RecId to custom text and parse the text once the client is started:
dynamics://0/?DrillDown_0MenuItemName=PurchTable&FieldName=PurchId&FieldValue=P000044
Unfortunately, in AX 2012 the RecId is checked before the client is started and if it is not a valid int64, the drill-down event is not sent to the client. Since it is not possible to change the RecId to anything other than an integer, #Alex Kwitny suggested in the comments at that same question that you can add the custom text to the drill-down target like this:
dynamics://0MenuItemName=PurchTable/?DrillDown_5637230378/
The problem I experience with this is that the link now gets confused about which instance to start.
If the target is equal to the value in the System Admin -> system parameters -> Alerts ->Drill-down target, a client with the correct server instance is started. When I append the text with my custom text, it always starts the default instance(Which could be different from the instance I intended to start). While this is not ideal, I could work around this issue.
The bigger problem is that it now always starts a new session of the default instance, even if a client session is already started. As far as I can see I cannot write X++ code to solve this issue since the server instance is determined before any code in the client is executed.
My question is this - How can I add custom text to the drill-down link while preserving the way the client instance is started: If a client for the instance is already open, it should process the link in the open client, and not start up a new client of the default instance.
You should probably come up with another solution as mentioned in this post, but there could still be a way.
The URL has two objects that can be modified:
dynamics://[Drill-down target(str)]/?Drilldown_[Int64]
According to you, if you modify the [Drill-down target], then it launches AX using the default client config, and that is behavior that you don't want. If you have a matching [Drill-down target], it'll launch in the open client window, which is behavior I can't confirm, but I'll take it at face value and assume you're correct.
So that means the only thing you can modify in the URL is [int64]. This is actually a string that is converted to an int64 via str2int64(...), which in turn corresponds to a RecId. This is where it gets interesting.
This work all happens in \Classes\SysStartUpCmdDrillDown\infoRun.
Well, lucky for you the ranges for the objects are:
RecId - 0 to 9223372036854775807
Int64 - -9223372036854775808 to 9223372036854775807
You can call minRecId() and maxRecId() to confirm this.
So this means you have -9223372036854775808 to -1 numbers to work with by calling URLs in this range:
dynamics://0/?DrillDown_-1
to
dynamics://0/?DrillDown_-9223372036854775808
Then you would modify \Classes\SysStartUpCmdDrillDown\infoRun to look for negative numbers, and fork to your custom code.
HOW you decide to user these negative #'s is up to you. You can have the first n-digits be a table id or a look-up value for a custom table. You can't technically use a RecId as part of that negative number because in theory the RecId could get up that high (minus 1).
It seems that youtube are now using ID's for their channels instead of names (part of the V3 api)
However it seems that the embedded iframe playlist player cannot handle these channel ID's
example channel https://www.youtube.com/channel/UCpAOGs57EWRvOPXQhnYHpow
then ID is UCpAOGs57EWRvOPXQhnYHpow
Now try to load this
http://www.youtube.com/embed/?listType=user_uploads&list=UCpAOGs57EWRvOPXQhnYHpow
Can anyone shine a light on this issue ? Or is there some hidden username ?
I also placed this question at the gdata-issues website http://code.google.com/p/gdata-issues/issues/detail?id=6463
The issue here is that a channel is not a playlist; channels can have multiple playlists, yet the listType parameter is designed to look for an actual playlist info object. The documented way around this is to use the data API and call the channel endpoint, looking at the contentDetails part:
GET https://www.googleapis.com/youtube/v3/channels?part=contentDetails&id=UCuo5NTU3pmtPejmlzjCgwdw&key={YOUR_API_KEY}
The result will give you all of the feeds associated with that channel that you can choose from:
"contentDetails": {
"relatedPlaylists": {
"uploads": "UUuo5NTU3pmtPejmlzjCgwdw"
}
}
If available (sometimes with oAuth), there could also be "watch later" lists, "likes" lists, etc.
This may seem like a lot of overhead. In the short term, though, it can be noted that the different feeds are programmatically named; so, for example, if my user channel begins with UC and then a long string, that UC stands for 'user channel' -- and the uploads feed would begin with 'UU' (user uploads) and then have the rest of the same long string. (you'd also have 'LL' for the likes list, 'WL' for the watch later list, 'HL' for the history list, 'FL' for the favorites list, etc. This is NOT documented, and so there's no guarantee that such a naming convention will perpetuate. But at least for now, you could change your ID string from beginning with UC to beginning with UU, like this:
http://www.youtube.com/embed/?listType=user_uploads&list=UUpAOGs57EWRvOPXQhnYHpow
And it embeds nicely.
Just to inform on current state of things -- the change suggested by jlmcdonald doesn't work anymore, but you can still get a proper embed link via videoseries (with the same UC to UU change). I.o.w. link like
http://www.youtube.com/embed/videoseries?list=UUpAOGs57EWRvOPXQhnYHpow
works as of at the moment of writing this.
I'm refurbishing a simple web-app that our field techs use. One of my goals is to make it Blackberry-friendly, as all of the techs are now using those. This app accepts basic information about a job and stores it. Among that info are times, telephone numbers, and a street address.
I have the time fields and telephone fields figured out with the following CSS:
input.time { -wap-input-format: "NN\\:NN"; }
input.phone { -wap-input-format: "\\(nnn\\)\\ nnn\\-nnnn" }
What I'm trying to do is determine how I can have the phone default to numeric input on an address field, then go alpha once a space has been inserted. I'm assuming that this can't be done with the -wap-input-format property above.
Is there another way--even if it's only for the Blackberry Browser--to do this without resorting to JavaScript? (Not that there's anything wrong with that :-) )
Thanks.
Have you considered a "Street Number" field followed by a separate "Street Name" field? There is no way to have a variable number of digits at the start of this sort WAP input field without using JavaScript.
I've found that javascript alone is the only way to do a decent job of subtle user input validation. Markup creates more challenges than it solves. With js you can let whatever keystrokes mean whatever you want, customized to any context.