Where to download Gmail Api? [closed] - api

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
i have to create a simple script which retrieves the mails from gmail account and then shows it to the user when user name and pass are supplied, the problem is am neither aware of gmail api and nor i know where to download it. i can't use any non official api, every help will be appreciated
edit:
i have to use php, just forgot to mention that btw i have found a solution here
http://petewarden.typepad.com/searchbrowser/2008/03/how-to-use-imap.html
there are still two problems here, that it is very slow and it retrieves the oldest first, can some one provide me with a solution for that or point me with any link?
i am noob

According to http://code.google.com/apis/gmail/
Gmail supports the standard IMAP and SMTP protocols for accessing and
sending e-mail messages. The Gmail IMAP and SMTP servers have been
extended to support authorization via the industry-standard OAuth
protocol.
http://code.google.com/apis/gmail/oauth/

There is no special api for getting mail from google servers. it uses the standard POP or IMAP protocols.
Not tested. Try it...
<?php
$mbox = imap_open("{imap.gmail.com:993/imap/ssl}INBOX", "username", "password");
echo "<h1>Mailboxes</h1>\n";
$folders = imap_listmailbox($mbox, "{imap.gmail.com:993}/imap/ssl}INBOX", "*");
if ($folders == false) {
echo "failed<br />\n";
} else {
foreach ($folders as $val) {
echo $val . "<br />\n";
}
}
echo "<h1>headers in INBOX</h1>\n";
$headers = imap_headers($mbox);
if ($headers == false) {
echo "Call failed<br />\n";
} else {
foreach ($headers as $val) {
echo $val . "<br />\n";
}
}
imap_close($mbox);
?>

There is no special API for retrieving mail. Mail is simply accessed via the standard POP or IMAP protocols - you will need to build a client for one of these protocols, or simpler, just use a ready-made library that does it for you.
You can find the Gmail server information here: POP and IMAP.

Can you be more specific?
The api information can be found here:
http://code.google.com/apis/gmail/

Related

I am trying to implement Permisions in asp.net boilerplate webApi [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I am trying to implement an AppService called Plug, I want to use User Role and Permissions and I can't seem to get it working, I applied the steps above and I am not winning.
namespace Sprint.Plug
{
[AbpAuthorize(PermissionNames.Pages_PlugEntity)] //Permisions
public class PlugAppService: AsyncCrudAppService<PlugEntity, PlugDto, Guid>, IPlugAppService
{
public PlugAppService(IRepository<PlugEntity,Guid> repository):base(repository)
{
}
}
}
Have you applied the permission to the database for your user/role in AbpPermissions table?
if you are already authenticated and you consume that API, [AbpAuthorize(PermissionNames.Pages_PlugEntity)] attribute will check you have permission in table AbpPermissions isgranted or not.
Ex :

create google analytics code through API [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Is there a google API to create google analytics code through API(not going to google site manually and create) ?
Please help...
The GA Management API is read-only. You cannot create accounts or profiles through it:
Google Analytics provides developer access to the configuration data through the Management API, which is a read-only API for account and configuration data.
To load the script using the async method you can include the ga.js file in the head programatically. This can be done in different ways but this is a common way:
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);//<------ Set the account number!
// Add other values
_gaq.push(['_trackPageview']);
_gaq.push(['_setDomainName', 'www.example.com']);
_gaq.push(['_setSiteSpeedSampleRate',5]);
// The the script to the head
(function() {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') +
'.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
You can push values into the _gaq variable before or after the gs.js script is loaded. You can add many kinds of tracking for events, transactions and virtual pageviews at any point in the page. Nothing to do with usual script that get from the account. The only thing you need is the account number
Try Google's docs for more details:
http://code.google.com/apis/analytics/docs/tracking/asyncUsageGuide.html
You can not create web property id through API.

API call for user count in Chrome Web Store? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I have an extension in the Chrome Web Store and I like knowing roughly how many people are using it via the "N users" and ratings on its page.
However, I don't really like loading the whole "product" page just to see a couple of numbers and thought I'd try to make a little widget that would display it instead. However, I can't find any API documentation for the Chrome Web Store.
I would a call like /webstore/api/v1/appid.json to exist, but the closest things I've found in searching only concern the Licensing API.
Is there an official Chrome Web Store API for user metrics?
This is no such API.
You can use Google Analytics inside an extension to track users manually.
If you don't need anything fancy, just a number of installs and users, there is My Extensions extension, it will track those numbers for you.
Copy and paste the snippet below wherever you want in the body of a html document saved with a ".php" extension.
<?php
//URL of your extension
$url = "https://chrome.google.com/webstore/detail/ddldimidiliclngjipajmjjiakhbcohn";
//Get the nb of users
$file_string = file_get_contents($url);
preg_match('#>([0-9,]*) users</#i', $file_string, $users);
$nbusers = str_replace(",", "",$users[1]);
echo $nbusers; //Display the number of users
?>
You can also do this client-side only (at least on your end) by using a cross-domain tool. This snippet will grab the number of users displayed on the Chrome webstore page for an extension (up-to-date as of April 28, 2018):
var chromeExtensionWebstoreURL = 'https://chrome.google.com/webstore/detail/background-image-for-goog/ehohalpjnnlcmckljdflafjjahdgjpmh';
$.getJSON('http://www.whateverorigin.org/get?url=' + encodeURIComponent(chromeExtensionWebstoreURL) + '&callback=?', function(response){
var numUsers = ((""+response.contents.match(/<span class="e-f-ih" title="([\d]*?) users">([\d]*?) users<\/span>/)).split(",")[2]);
console.log(numUsers);
});
In the future, Google may change the class name of the user count span, in which case you just need to update the regex appropriately.

Library or API that gathers user info from social networks [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'd like to gather user data in a web-based intranet application similar to rapportive, gist and xobni. These services gather and display facebook profiles, twitter streams, linkedin profiles, etc. based on the user's email address in your inbox.
Is there a 3rd party library or API (free or paid) that would provide this kind of data from social networks based on a person's email address? I'd rather not have to go through and create calls for all these different services, not to mention maintaining all these APIs. If there is already a service out there that does the work of search and aggregation that would be so useful.
The application is in C#, so a C# library or wrapper for the API would be nice but definitely not a requirement.
Rapleaf... that is the magical service that you can use to find social media data. They have both batch and API REST services.
Yes Rapleaf appears to be the way to go. But applying for the API key appears to take some time; they may or may not grant an API key. any experience with this?
If you're a somewhat industrious coder and you only have a select few social networks to search, it isn't so difficult to write simple library functions to access their APIs yourself. They all have different limits on how much searching you are allowed to do, so keep the idea of throttling in mind.
Here's an example of a php function I use to search for people Batchbook by email address, you should be able to modify this to get data from most typical REST APIs:
function getBatchbookContacts($orgname, $apikey, $emailSearch, $page) {
$url = "https://{$orgname}.batchbook.com/api/v1/people.json?auth_token={$apikey}&email={$emailSearch}&page={$page}";
$request = new HttpRequest($url, HttpRequest::METH_GET);
$request -> setContentType('application/json');
try {
$response = $request -> send();
if ($response -> getResponseCode() == '201' || $response -> getResponseCode() == '200') {
$result_json = $response->getBody();
return $result_json;
} else {
throw new Exception($response -> getBody(), $response -> getResponseCode());
}
} catch (HttpException $ex) {
throw new Exception('Internal Server Error: ' . $ex -> getMessage(), 500);
}
}

Finding if domain name is already registered? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Hi, Is there any API to lookup if a given domain name is already registerd by somebody and get alternative (auto suggested available domain names)?
EDIT:- I think the thing I need is called domain-search not the lookup :)
I've written a whois for PHP, Perl, VB and C# all using a trick that queries '{domain}.whois-servers.net'.
It works well for all but the obscure domains that require registration (and usually fees) such as tonga .tv or .pro domains.
PHP Whois (version 3.x but should still work)
C# Whois
COM Whois (DLL only, I lost the source)
This page shows it in action. You can do some simple string matching to check if a domain is registered or not based on the result you get back.
It's called whois... and for auto-suggestion, there is the domain service at 1&1.
http://www.mashape.com/apis/Name+Toolkit#Get-domain-suggestions - Advanced domain name suggestions and domain checking API.
I think you can use http://whois.domaintools.com/ to get the information. Send a web request as http://whois.domaintools.com/example.com and it will return the information of example.com. But you need to parse the response to filter the required information.
http://whois.bw.org/ is very good. does suggestions and such.
I want an api that I can call from my code or pages. The XML API on www.domaintools.com seems like the thing that I need. I'm looking into it.
thanks for your support. I've found a service by domaintools.com called whoisapi. You can query available domain names and other information by sending an xml request to their servers.