I am using the ST Search/User API method and am able to get a response however it is limited. In the documentation found here, if you click on "Extended Version" it shows you can get the followers, following, ideas, and etc. However when I access the API, I only get in return id, type, username, name, avatar. Its very limited compared to the API documentation.
Am I doing something wrong or has the API changed? The query I am using is this https://api.stocktwits.com/api/2/search/users.json?access_token=ACCESSTOKEN&q=USERNAME
Extended data is for partner level access only. Please refer to the getting started guide here https://stocktwits.com/developers/docs/start
If you would like partner level access, please send us an email at api#stocktwits.com
Related
I'm trying to figure out how to let a user redeem a discount/ promo code in Stripe.
Looking at the documentation I think should retrieve the code using PromotionCodeService() so I can then get the discount amount to apply to the subscription, something like
var service = new PromotionCodeService();
service.Get("promo_1HMxuf2eZvKYlo2CmGXSyhRx");
But I cannot seem to get access to that service as I can the ProductService(), CouponService() etc.
Can anyone point me to any example code on where this has been done before, I'm sure it's a common enough thing.
Thanks in advance
Generally the integration would be
you accept some input from the user for the user-facing code they entered
use https://stripe.com/docs/api/promotion_codes/list#list_promotion_code-code to look up the promo code objects related
create the user's subscription and pass PromotionCode in the SubscriptionCreateOptions with the ID of one of the objects(https://stripe.com/docs/billing/subscriptions/discounts/codes#applying-promotion-codes)
But I cannot seem to get access to that service as I can the ProductService(), CouponService() etc
That almost certainly means you're using an old version of the stripe-dotnet library from before when that service was added, so upgrading should fix that. https://github.com/stripe/stripe-dotnet/blob/master/CHANGELOG.md#37290---2020-08-05
In an attempt to call the RateCard API in Azure there is a need for several parameters that the typical Azure administrator will not have at hand easily. These include:
OfferDurableId
Currency
Locale
RegionInfo
If all we have is the subscriptionID, how do we programmatically get the above information so we can get the rate card for the subscription?
While Microsoft samples on GitHub (https://github.com/Azure-Samples/billing-dotnet-ratecard-api) demonstrate this using an app.config the reality is there is a lot of friction asking administrators to dig this up. There has to be a way to get this information without having to ask the admins all the time.
A typical URL to call the rate card API would be something like:
string url = $"https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/RateCard?api-version=2015-06-01-preview&$filter=OfferDurableId=\'{offerId}\' and Currency eq {currency} and Locale eq=\'{locale}\' and RegionInfo eq \'{regionInfo}\'";
Any ideas what APIs I can call to get this information from the subscription ID?
I think that except for the OfferDurableId parameter (which you can see the available values at Microsoft Azure Offer Details), the rest of the parameters should have a fixed value depending on the loction relevant to your organization.
For example, if your organization is located in the United States, then you would probably use:
Currency: USD
Locale: en-US
RegionsInfo: US
Update
Unfortunately, the API reference page states clearly to consult the Offer Details page to get the required ID:
Set {OfferDurableId} to a valid Offer ID code (e.g., MS-AZR-0026P). See Microsoft Azure Offer Details for more information on the list of available Offer IDs, country/region availability, and billing currency. The Offer ID parameter consists of the “MS-AZR-“ prefix, plus the Offer ID number.
Regarding whether it will allow you to query using Currency/Locale/RegionInfo values not used by your subscription, I think it should be possible (to some extent at least), as your a just querying for general metadata.
Hope it helps!
Long shot, but I'd like to fiddle with ViaGogo API (C# library more precisely). ViaGogo has a well documented public API, documentation is avaliable here.
Problem is, you need to authenticated as it usually happens with this kind of APIs: usually, you find a section of the website, maybe in your profile section, where you can obtain keys, secrets and so on (this happens for example on Facebook or Amazon).
As for ViaGogo, I only found a link that points to a Google Form: this form asks for info about advertising and affiliation on a complete different level of what I need, I won't publish anything read via API. Furthermore, there's no field to leave an e-mail address.
Their C# library seems pretty popular as far as I can tell from downloads from NuGet; I wonder how all these thousands of devs succesfully called that API.
Has anyone succesfully obtained authentication info from ViaGogo?
According to note in registration form, you have to wait for 30 days for their reply.
For more help you can contact them on following contacts:
E-mail: affiliate#viagogo.com
Telephone: +442075532777
Or
http://www.viagogo.com/in/help
There doesn't seem to be any way around this registration according to their website and the api itself -- an appID and password is required. You may try your luck emailing them at Affiliate.Team#viagogo.com -- see this issue on github where the possibility of getting an account via email is discussed: https://github.com/viagogo/developer.viagogo.net/issues/24
I'm working on custom UI for company's directory based on Lync. Using Lync 2013 I execute this search:
Container.Instance.Lync.ContactManager.BeginSearch(SearchQuery,
SearchProviders.GlobalAddressList,
SearchFields.AllFields,
SearchOptions.IncludeContactsWithoutSipOrTelUri,
500,
ContactsAndGroupsCallback, SearchQuery);
For each of matching contacts I try to access their endpoints to display phone number:
var cit = ContactInformationType.ContactEndpoints;
var endpoints = contact.GetContactInformation(cit) as List<object>;
Problem
If found contact is in the contact list of account I'm using to connect Lync, then I get access to full details (5 endpoints). However if he is not in contact list, I get access to only 1 endpoint.
Any ideas why is it happening like that? Is there a global privacy setting I need to turn off or something?
How can I get access to all endpoints at all times?
Thank you.
PS: I tried to load each contact in the result set individually and still get the same behavior.
I encountered a similar problem when trying to write a program to obtain the status of all users on Lync SDK 2010. Chose all users and read it's status (online / offline etc.). But it's working out well with only those contacts that were in the list of client contacts. I do not know why, but the solutions are not found.A little later I use UCMA 4 (with Application endpoint), though the list received from AD and only able to get the current status.
Maybe it makes sense to use the search by AD? Find phone number by user sip? If so, try to use this filter for DirectorySearcher:
searcher.Filter = "(&(objectClass=user)(msRTCSIP-PrimaryUserAddress=*))"; //put sip instead of *
P.S. what sdk are you using?
Answer from Microsoft Support:
The behavior you are seeing is due to presence subscription optimization to the Lync client so that the subscription is delayed until the necessary contact information is required by the Lync client. Photo is an example for this optimization. Another example is ContactEndpoints. Please take a look at Contact presence subscription changes section of the Migration doc for Lync 2013 page in MSDN docs.
Specifically you must create and maintain your own ContactSubscription for the contacts that you need all the ContactEndpoints.
I have been facing the same issue. You can try loading the person's ContactCard before calling the GetContactInformation function explicitly
Microsoft.Lync.Controls.ContactCard objContactCard = new Microsoft.Lync.Controls.ContactCard();
objContactCard.Source=objContact.GetContactInformation(ContactInformationType.EmailAddresses);
ContactSubscription _contactSubscription = lyncObj.ContactManager.CreateSubscription();
_contactSubscription.AddContact(foundContact);
_contactSubscription.Subscribe(ContactSubscriptionRefreshRate.High, _ContactInformationList);
However, you still might get some delay in getting the information (phone numbers). You can choose to use Thread.Sleep or might just want to retry.
Hope this helps.
Problematic is relying on contact information even for the lync client user. In our solution we are doing something like this:
Contact user = LyncClient.GetClient().Self.Contact;
string email = user.GetContactInformation(ContactInformationType.PrimaryEmailAddress) as string;
I would expect that the current lync user contact always is filled properly. And if it wasn't, I'd expect the code to throw an exception or at least return null or an empty string.
Instead it sometimes returns the sip-uri of the contact without the leading "sip:" prefix. Oddly enough this is not always reproducable: Most of the time the code above returns the primary email address (according to active directory) correctly, sometimes it behaves as mentioned above.
I know this has been posted before, but never really answered, I'm using the DotNetOpenAuth to try and do GoogleID login, and every time I do details = OResponse.GetExtension<ClaimsResponse>(); I always, always, always get back null, I don't get whats the point of the GoogleID if I can't get back any information, I would think at the very least I would get an email address, so I could associate it other login information in my databse. I just don't understand could really use some help, Im probably just looking at openID in the wrong way.
I'm using ASP.NET and looking to use openID/Facebook as my sole means of logging in users, I really don't want to mess with membership roles, or extra junk that ASP.NET likes to add.
Yes, this has been asked and answered many times. Google does support AX. But it ignores any attributes marked as "optional". So if you want the email address, you have to say that email address is a required attribute.
The ClaimsResponse extension you're checking for isn't AX -- it's Simple Registration. But if you have AXFetchAsSregTransform behavior turned on (highly recommended) then it allows you to just use ClaimsRequest and ClaimsResponse exclusively, and DotNetOpenAuth will automatically translate to and from AX behind-the-scenes for you.
Alternatively, you can use FetchReqest and FetchResponse to speak AX directly to Google.
But (and I can't hammer this hard enough), do not use the email address as the user's unique identifier!!! Instead, use the IAuthenticationResponse.ClaimedIdentifier string as the unique identifier. Email address should generally be considered just a helpful hint that can be used to prefill a registration form. You shouldn't even trust that the email address you get is really under the user's control (that's one reason why it shouldn't be considered their unique id) since the Provider can lie to you. Google and Yahoo are two providers that promise (if you choose to trust them) that the email addresses have been verified, so you can skip the email validation step for users from them if you wish.
It doesn't appear that Google's OpenID server supports AX or sreg.