i am using exact online PHP SDK. i am able to create record using POST Request.
How to send update request to update SalesOrder DeliveryDate using Orderid?
please find below example to update request in exact online
$salesorderline = new \Picqer\Financials\Exact\SalesOrderLine($connection);
$s = $salesorderline->find('xxxxxx-xxxx-xxx-xxxxxx');
$s->Notes = 'mahamood';
$s->DeliveryDate = '2018-08-02 08:30:00.000000';
$s->update();
Related
This might be a short lived question.
When creating an Appointment object with Exchange Web Service - is it possible to disable the Repsonse Options: Accept / Decline / Tentative?
Essentially, an appointment needs to be set in the recipient calendar and not be "actionable".
The AllowedResponseActions property is readonly but I was hoping there was a way of setting that property when creating the Appointment.
Not sure if this is possible - I have searched for a while but I could not find an answer.
Thanks in advance.
According to my research, I didn't find any API for your needs. However, I'm not sure if you use the PidTagResponseRequested extended property to disable the Response Options. Please refer to the following code:
Appointment appointment = new Appointment(service);
appointment.Subject = "TestApt";
appointment.Start = DateTime.Now.AddHours(1);
appointment.End = DateTime.Now.AddHours(2);
ExtendedPropertyDefinition PidTagResponseRequested = new ExtendedPropertyDefinition(0x0063, MapiPropertyType.Boolean);
appointment.SetExtendedProperty(PidTagResponseRequested, false);
appointment.Save();
appointment.RequiredAttendees.Add("user#domain.com");
appointment.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendOnlyToChanged);
Reference link: Create an appointment using C# & EWS and set "Response Options"
Also, use group policy to disable the tentative response option
I want to display a photo of a google place. I'm using below code to get the information about a place
$request = new PlaceDetailRequest($placeID);
$response = $this->container->get('ivory.google_map.place_detail')->process($request);
Its Working fine.
With $response->getResult()->getPhotos()[0]->getReference() I get the reference to the first photo.
Now to get the real URL of this photo I have to call
https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photoreference=PHOTOReference&key=YOUR_API_KEY
To get this I using below code
$requestPhoto = new PlacePhotoRequest($placeID);
$responsePhoto = $this->container->get('ivory.google_map.place_photo')->process($requestPhoto);
and get below error:
You have requested a non-existent service "ivory.google_map.place_photo". Did you mean this: "ivory.google_map.place_detail"?
Can anybody help me? Or: How can I get the URL on a different way?
OK, found the problem: It was a misconfiguration of the config.yml. I had an empty line before 'place_photo'
ivory_google_map:
place_detail:
client: httplug.client.default
message_factory: httplug.message_factory.default
format: json
api_key:
place_photo:
Goal: to update a Fusion Table by replacing old rows by new ones from a csv file without headers using ReplaceRows().
I am using the Google.Apis.Fusiontables.v2 library.
I have read and reread the documentation, but still can`t get my code working.
Authentication is working and I am able to perform simple INSERTs without issue:
string sql = "INSERT INTO 11t9VLt3vzb46oGQMaS2LTSPWUyBYNcfi1shkmvag (rpu_id, NO_BAIL, 'Usage (description)', 'Use (description)', 'Sup. louable m2', 'Sup. Utilisable m2', 'SumTotal Lou', 'Percent Lou', 'SumTotal Util', 'Percent Util') VALUES (9999,1111,'Test','Test En',1,2,3,4,5,6)"
Sqlresponse sqlRspnse = service.Query.Sql(sql).Execute();
I have tried ReplaceRowsMediaUpload and ReplaceRowsMediaUpload directly from the TableResource class without luck.
Calling the upload function from the service object doesn't error out, but I'm not sure what to do next that would actually replace the rows in the Fusion Table (service is a FusiontablesService):
StreamReader str = new StreamReader(Server.MapPath("~") + #"\sample2.csv");
service.Table.ReplaceRows("1X7JMLFy75uq20UnU6cLrGTTDfp6lLuD1Fc3vYYjQ", str.BaseStream, "text/csv").Upload();
I've tried:
service.Table.ReplaceRows("1X7JMLFy75uq20UnU6cLrGTTDfp6lLuD1Fc3vYYjQ").Execute()
following the upload, but this just puts the Fusion table in "stuck" mode.
Can someone please provide the lines required to make ReplaceRows work? (Explanations would be appreciated, but aren't necessary!).
You should change "text/csv" for "application/octet-stream". (See accepted MIME type here: https://developers.google.com/fusiontables/docs/v2/reference/table/replaceRows)
StreamReader str = new StreamReader(Server.MapPath("~") + #"\sample2.csv");
service.Table.ReplaceRows("1X7JMLFy75uq20UnU6cLrGTTDfp6lLuD1Fc3vYYjQ", str.BaseStream, "application/octet-stream").Upload();
The call to Upload should be enough.
Also, try to create a new table to test it out, to be sure it is setup correctly.
You can use a REST API call to replace a row in your Google Fusion table directly instead of writing methods to do that. Here is an example:
POST https://www.googleapis.com/upload/fusiontables/v2/tables/tableId/replace
Please refer to this document for more details, it has a testing environment tool too.
I'm new to amazon MTurk, and I'm trying to create hits and fetch results through boto v-1.8d. However, this has brought up a lot of issues and I'm wondering if this is because I'm using an older version of boto.
Note: I can't use the latest release since this is my way of learning how to work with MTurk to implement an open source application called CrowdForge, which is only compatible with boto v1.8d.
If you know of any sample code for 1.8d and/or tutorials, I'd appreciate it if you share the link.
For example: One think im confused about is that the result of the following code is empty brackets "[]" instead of showing a value such as [10000].
#import classes needed from boto library
from boto.mturk.connection import MTurkConnection
#specify your own access key and secret access key
ACCESS_ID = 'myAccessKey'
SECRET_KEY = 'mySecretKey'
HOST = 'mechanicalturk.amazonaws.com'
SECURE = True
#make a connection
mtc = MTurkConnection(aws_access_key_id = ACCESS_ID,
aws_secret_access_key = SECRET_KEY,
host = HOST,
is_secure = SECURE)
#display the account balance
print mtc.get_account_balance()
I've been trying to get the most recent Facebook Status for a fan page via the API for a while now and can't seem to get what I'm after. I'm really trying to avoid using RSS for it. I can get the full list from the feed via https://graph.facebook.com/174690270761/feed but I want only the last status posted by the page admin, not by anyone else.
Is their an easy way to get it without having to authenticate?
Thanks in advance
edit:
https://graph.facebook.com/174690270761/statuses seems to be what I'm looking for but I need an OAuthAccessToken for this but can't see how to without involving the user, as I'm trying to access through my own credentials/application
Facebook has changed the api and now requires you to provide an access token.
You can use Facebooks PHP sdk for that but i found a much quicker way to go:
<?
$appid = '1234567890';
$secret = 'db19c5379c7d5b0c79c7f05dd46da66c';
$pageid = 'Google';
$token = file_get_contents('https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id='.$appid.'&client_secret='.$secret);
$feed = file_get_contents('https://graph.facebook.com/'.$pageid.'/feed&'.$token);
print_r(json_decode($feed));
?>
Update 15/12/12
app access tokens nosist of the id and secret now - use this request:
$feed = file_get_contents('https://graph.facebook.com/Saxity/feed?access_token='.$appid.'|'.$secret);
I finally found out that this doesn't have to be done through the API, or require any authentication at all.
Basically you can access the data via a JSON feed:
$pageID = "ID of Page" //supply the Id of the fan page you want to access
$url = "https://graph.facebook.com/". $pageID ."/feed";
$json = file_get_contents($url);
$jsonData = json_decode($json);
foreach($jsonData->data as $val) {
if($val->from->id == $pageID) { //find the first matching post/status by a fan page admin
$message = $val->message;
echo $message;
break; //stop looping on most recent status posted by page admin
}
}
I don't think there's a good way to do this. You can process the JSON pretty easily though from the looks of it. You can limit the number of results by using the since query parameter. For instance:
https://graph.facebook.com/174690270761/feed?since=last%20Monday
You can also use limit on that, but I don't think that filters by user. If the administrator is the only one allowed to post, then you may be able to get away with using limit=1.