<?php

class GoogleConnector extends HybridAuthConnector
{
    protected $offset = 1;

    protected function getAccessTokenKey($provider)
    {
        return "hauth_session.$provider.token.access_token";
    }

    protected function getRefreshTokenKey($provider)
    {
        return "hauth_session.$provider.token.refresh_token";
    }
    
    protected function initiateProviderSpecificSync($meta, $model)
    {
        $auth = new HybridAuthAdapter($model->provider);
        $this->getAuthAdapter($auth, $model);
        $auth->adapter->getContacts(array("offset" => $meta->offset, "limit" => $meta->limit, 'model' => $model));

        return $meta->offset + $meta->limit;
    }
}
