Fix api code samples in readme