FatFractal customer forums



Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jonnycools

Pages: [1] 2 3 ... 5
1
NoServer Questions and Answers / Re: Advanced leaderboards and positions
« on: August 15, 2014, 02:13:57 PM »
Hey you,

So I would have three objects

Hastag
- Name: String
- Plays: Numeric

Play
- Hastag : Ref:Hastag
- Name : String
- User : FFUser

Score
- user : ref: FFUser
- points : numeric

Basically you would create a play object client side with just the name and user filled in. In the create handler you can check if the hash tag exists or not. Then you can associate it with the play before save. You can also increment the pints for the user at that time.

Then you can track trending via the hag object or via the score object depending.

2
NoServer Questions and Answers / Re: Required fields?
« on: April 29, 2014, 09:26:34 AM »
You can only define the schema in fddl. What you need to do here is a create PRE handler on the collection crom here you can check in JavaScript if something is missing or the user doesn't have permission to edit... Then just throw an error

3
NoServer Questions and Answers / Blob 404 Error
« on: April 04, 2014, 02:00:45 PM »
I;m geting a 404 error when trying to retrieve a blob via a client and as the system user in the data browser. I set the read permission on the collection to loggedin. Any idea what going on?

4
NoServer Questions and Answers / Re: Oops
« on: April 02, 2014, 12:26:53 PM »
Sorry totally spaced on this.

I went back to the trusty postObj: toExtension.

I wrote a test extension for this.

iOS

Code: [Select]

FFReadRequest * request = [[FatFractal main] newReadRequest];
   
    [request prepareGetFromExtension:@"extension"];
   
    [request executeAsyncWithBlock:^(FFReadResponse *response) {
       
        NSLog(@"%@", response.obj);
       
    }];


JS

Code: [Select]

var response = ff.response();

response.responseCode = 200;

response.statusMessage = "Request successful";

response.result = "test";

response.mimeType = "application/json";

return;


Log iOS

Code: [Select]

2014-04-02 12:24:20.430 I Live VIP Venue[13193:60b] objectsFromJsonResponse {
    result = test;
    statusMessage = "Request successful";
}
forRequestUri https://*****
httpResponse <NSHTTPURLResponse: 0x17585270> { URL: https://****** } { status code: 200, headers {
    Connection = "keep-alive";
    "Content-Length" = 54;
    "Content-Type" = "application/json";
    Date = "Wed, 02 Apr 2014 16:24:21 GMT";
    Pragma = "no-cache";
    Server = "nginx/1.2.5";
    "X-Powered-By" = "FatFractal 0.1";
} }
loadFromCacheOnly 0
doAutoLoadRefs 1
doAutoLoadBlobs 0
2014-04-02 12:24:20.431 I Live VIP Venue[13193:60b] (null)


5
NoServer Questions and Answers / Re: Oops
« on: March 31, 2014, 04:37:34 PM »
Not sure if this is related to this or not but I'm having an issue getting the result from a extension using read requests.

I create it. Prepare it using prepareGetFromExtension, then execute is async without options.

I should mention that i'm only returning a string from the server.

Now when i retrieve i from the response.obj it prints out in the console. I see the text of the response and its there but response.obj returns null.

6
NoServer Questions and Answers / Re: Example of FFLocalStorage
« on: March 27, 2014, 11:07:41 PM »
Code: [Select]

 FFLocalStorageSQLite * localStorage = [[FFLocalStorageSQLite alloc] initWithDatabaseKey:@"unique key"];
   
    //[localStorage setDebug:YES];
   
    [localStorage wipeAllData];
   
    FatFractal * ff = [[FatFractal alloc] initWithBaseUrl:@"https://<domain>.fatfractal.com/<application>"];
   
    FFReadRequest * request = [[FatFractal main] newReadRequest];
   
    NSString * uri = [NSString stringWithFormat:@"/Profile/<guid>"];
   
    [request prepareGetFromUri:uri];
   
    [request executeAsyncWithOptions:FFReadOptionCacheResponse | FFReadOptionUseCachedIfCached andBlock:^(FFReadResponse *response) {
       
       Profile * profile = response.obj
       
    }];


Before you create your ff instance, create the local storage. Note upon logout the local storage is wiped.

Use a read request to store any sort of request, including blobs to the local storage using FFReadOptionCacheResponse.

Using FFReadOptionUseCachedIfCached will first look into the cache to see of the object at the uri is there, if not it faults to the online database.

I do have sample code at my disposable thanks to @GaryCasey for lazily loading and caching blobs on objects, I can post if you like.

Hope this helps

7
You can declare the collection as PRIVATE and only sever side code can interact with it.

CREATE PRIVATE COLLECTION /Name

So no requests to that URL will go through.

8
Wow, wow, wow. You shouldn't tease on web sockets

9
This behavior is perfect. Server side would be nice so I can do big operations.

10
Or does it just keep the array synced via PUT

11
Does this work for moving an object from the array if it was previously retrieved from a fatfractal instance?

12
Trolling the documentation as we speak. I like what I see.

13
NoServer Questions and Answers / Re: Delta Updates?
« on: March 22, 2014, 07:59:32 PM »
For the REST API

14
NoServer Questions and Answers / Re: Delta Updates?
« on: March 22, 2014, 07:57:20 PM »
That's perfect. This is all I want. Well I was just saying. As long as I have it I really don't care how it's done. When you're done, would I be possible to see what the structure of the json should look like. No rush there.

Thank again

15
NoServer Questions and Answers / Re: Delta Updates?
« on: March 22, 2014, 07:48:29 PM »
I've seen other services till this all into the PUT command. They only change what's there.
Could you also do array based operations for Grabbags. So I provide an array of ffurls and the add it remove operation. Maybe this can be done on update and create?

Pages: [1] 2 3 ... 5
Copyright © FatFractal customer forums