Hi,
when i try to add a job to google base i always get an error 400 bad
request but if i set the type to test it works fine.

Is the jobs type still enabled on google base?

here is my code, if i uncomment the test line it works fine but if i
uncomment the jobs line it fails


GBaseService service = new GBaseService("[site]",
WebConfigurationManager.AppSettings["GoogleAPIKey"]);
            service.setUserCredentials("[email protected]", "password");

            GBaseEntry entry = new GBaseEntry();
            entry.Title.Text = job.Title;
            entry.Content.Content = job.Description;
            //entry.GBaseAttributes.ItemType = "Test";
            //entry.GBaseAttributes.ItemType = "jobs";
            entry.GBaseAttributes.AddTextAttribute("education", "");
            entry.GBaseAttributes.AddTextAttribute("employer",
job.Company.Name);
            entry.GBaseAttributes.AddDateTimeAttribute
("expiration_date", job.Expires);
            entry.GBaseAttributes.AddTextAttribute
("immigration_status", "");
            entry.GBaseAttributes.AddTextAttribute("job_function",
job.Title);
            entry.GBaseAttributes.AddTextAttribute("job_industry",
job.JobCategory.Description);
            entry.GBaseAttributes.AddTextAttribute("job_type",
job.JobType.ToString());
            entry.GBaseAttributes.AddLocationAttribute("location", new
Location(job.Address, job.Lat, job.Lng));
            entry.GBaseAttributes.AddDateTimeAttribute("publish_date",
job.Submitted);
            entry.GBaseAttributes.AddTextAttribute("salary_type",
job.Salary);

            entry.GBaseAttributes.AddTextAttribute("tags",
job.TagList);
            entry.AlternateUri = new Google.GData.Client.AtomUri
("http://www.[site].com"; + Url.JobDetails(job.Id, job.Title));//.Add
(new Google.GData.Client.AtomLink("www.[site].com" + Url.JobDetails
(job.Id, job.Title)));
            entry.Authors.Add(new Google.GData.Client.AtomPerson
(Google.GData.Client.AtomPersonType.Author, "[site].com"));

            GBaseEntry myEntry = service.Insert
(GBaseUriFactory.Default.ItemsFeedUri, entry);


any pointer will help
thanks

--

You received this message because you are subscribed to the Google Groups 
"Google Base Data API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-base-data-api?hl=en.


Reply via email to