Go to Post I love first because of the late nights, the unparralleled stress, the excitement, the emotion. Because of the close defeats, the close victories. Because of the pride, the sense of accomplishment, the feeling of embettering the world. But most of all, because of you, the other teams. - Keith Chester [more]
Home
Go Back   Chief Delphi > Other > Chit-Chat
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 05-07-2005, 23:46
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: libgmailer experience?

Quote:
Originally Posted by MrToast
Code:
function getInfo() {
	$snapshot = $this->getSnapshot(GM_STANDARD);
	$info = array();
	if ($snapshot) {
		$info["quota"]["MB"] = $snapshot->quota_mb;
		$info["quota"]["Percentage"] = $snapshot->quota_per;
		$info["invitations"] = $snapshot->have_invit;
		$info["labels"] = $snapshot->label_list;
		$info["total"] = $snapshot->box_total;
	}
	return $info;
}
When you call getSnapshot, your only have the $type parameter set (GM_STANDARD), but in the class GMailSnapshot constructor it also has a $raw parameter. There is an if statement which decides whether or not to set $this->have_invit;
Code:
if (isset($raw["i"][1])) $this->have_invit = $raw["i"][1];
But, $raw isn't set. Maybe try something like
Code:
function getInfo() {
	$raw = array(
		  "i" => array(TRUE),
		  "gn" => array(TRUE),
		  "v" => array(TRUE)
		);
	$snapshot = $this->getSnapshot(GM_STANDARD);
	$info = array();
	if ($snapshot) {
		$info["quota"]["MB"] = $snapshot->quota_mb;
		$info["quota"]["Percentage"] = $snapshot->quota_per;
		$info["invitations"] = $snapshot->have_invit;
		$info["labels"] = $snapshot->label_list;
		$info["total"] = $snapshot->box_total;
	}
	return $info;
}
That array setup may be fubar, as I've never dealt with multi-dimensional arrays in this sense...

EDIT (Again): Just looked over the code, and $this->have_invit is set from the array put in as a parameter, so I don't think you can get the amount of invites from calling this function =(

Maybe some creative use of sockets and regular expression functions would let you parse the info out?

__________________
http://www.mikesorrenti.com/

Last edited by Mike : 05-07-2005 at 23:55.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
worst experience mike pawlak Chit-Chat 15 06-12-2004 07:04
Your Worst FIRST experience Richomundo General Forum 54 18-07-2004 23:02
A testimony to my unique FIRST experience: Ken Leung General Forum 22 14-04-2004 20:45
FIRST was an awesome experience for our rookie team (team overview) TheGreatPF General Forum 6 05-04-2004 00:15
2003 IRI: A driver's last hurrah or a new rookie driver's experience? Amanda Morrison Off-Season Events 14 23-05-2003 17:39


All times are GMT -5. The time now is 09:00.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi