Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6022199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:49:27+00:00 2026-05-23T03:49:27+00:00

I’m building a URL to gain access to a users Google calendar with the

  • 0

I’m building a URL to gain access to a users Google calendar with the google-javi-api as such:

CalendarUrl url = CalendarUrl.forEventFeed("accountName", "private", "full");

which returns me this url:

"https://www.google.com/calendar/feeds/user@gmail.com/private/full?prettyprint=true"

I would like to set parameters to this URL with startMin and startMax parameters so the URL would eventually look like this:

"https://www.google.com/calendar/feeds/default/private/full?start-min=2011-06-00T00:00:00&start-max=2011-06-24T23:59:59"

All of my attempts at this have failed, and after logging the URL that is being returned, I find that the “?” is being replaced by “%3F” and ampersands are being replaced by “&”

The incorrect url that is bring returned is:

"https://www.google.com/calendar/feeds/default/private/full%3Fstart-min=2011-06-00T00:00:00&start-max=2011-06-24T23:59:59"

I’m pretty sure the reason my result set is null is because of those character replacements. How do I append the original URL with the new parameters?

**If you’re wondering how I’m building this url, I’m using the CalendarURL class from this sample Android implementation of Google Calendar.

EDIT

More specifically, in the CalendarURL class, I can add parts to the “path” of the URL, but I can’t find a way to include a query parameter. Does this API not include a way to specify a parameter?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:49:28+00:00Added an answer on May 23, 2026 at 3:49 am

    The proper way to create a URL using google-java-client-api is to extend the GoogleUrl object. (I’m using Google Latitude here as a sample. I create a GoogleUrl object, and later on you’ll see how it gets used).

    The Google URL object

    • You construct a URL object extending GoogleUrl
    • You annotate the parameters you would like to customize on the URL using the @Key annotation
    • You provide a constructor that takes on the root url.
    • You add parts to the context using the pathParts.add method

    A sample URL object looks like this:

    public final class LatitudeUrl extends GoogleUrl {
    
      @Key
      public String granularity;
    
      @Key("min-time")
      public String minTime;
    
      @Key("max-time")
      public String maxTime;
    
      @Key("max-results")
      public String maxResults;
    
      /** Constructs a new Latitude URL from the given encoded URI. */
      public LatitudeUrl(String encodedUrl) {
        super(encodedUrl);
      }
    
      private static LatitudeUrl root() {
        return new LatitudeUrl("https://www.googleapis.com/latitude/v1");
      }
    
      public static LatitudeUrl forCurrentLocation() {
        LatitudeUrl result = root();
        result.pathParts.add("currentLocation");
        return result;
      }
    
      public static LatitudeUrl forLocation() {
        LatitudeUrl result = root();
        result.pathParts.add("location");
        return result;
      }
    
      public static LatitudeUrl forLocation(Long timestampMs) {
        LatitudeUrl result = forLocation();
        result.pathParts.add(timestampMs.toString());
        return result;
      }
    }
    

    Usage

    You use this object to construct the URL, just fill in your parameters (the @Key annotated fields), and execute the build() method to get a string representation of it :

        LatitudeUrl latitudeUrl = LatitudeUrl.forLocation();
        latitudeUrl.maxResults="20";
        latitudeUrl.minTime="123";
        latitudeUrl.minTime="456";
    
        System.out.println(latitudeUrl.build());
    

    Output :

    https://www.googleapis.com/latitude/v1/location?max-results=20&min-time=456
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.