Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    ro6lyo
    @ro6lyo
    How can I do a spine.findall() request with pageoffset set to 10
    I tried a different approuch which I sow in test examples For pagination
    ro6lyo
    @ro6lyo
    query.paginate(PageBasedPagination(pageNumber: 1, pageSize: 5))
    then the same but with offsetbasedpagination
    Then I did just spine.find(query)
    It that a right approuch
    ro6lyo
    @ro6lyo
    I read the doc about loading
    So can I do somethig like
    spine.load(resourceName , queryCallback: query)...
    Qerycallback is the query which I created abouvr with pagination page offset set to 10
    Ward van Teijlingen
    @wvteijlingen
    If you want make do a request with pagination you have to use Spine.find with a Query.
    spine.load takes a Resource object and loads it if it is not already loaded.
    Otherwise is does nothing
    ro6lyo
    @ro6lyo
    Can you tell me how to load relationship resources
    ro6lyo
    @ro6lyo
    I have 2 resource classes linked together as your example "example resource class"
    And our server responses with resources with relationship and also has top-level
    member "included" where are located all the related resources
    i dont know how to load them
    ro6lyo
    @ro6lyo
    I found the way I guess it is the right way :)
    ro6lyo
    @ro6lyo
    hei can you give a little bit of information about error handling , basically how can I handle api respond errors, I am able to see them on console thru loglevels . but how can I catch them
    Shad Sharma
    @shadanan
    Hey guys. I recently tried to build Spine with Carthage, but I've been having trouble. It looks like the build fails when it tries to compile BrightFutures. I think the problem is related to swift having changed recently. I think that Spine's dependencies may need to be updated?
    ro6lyo
    @ro6lyo
    I'm using it with cocoapods and it works perfectly fine
    Shad Sharma
    @shadanan
    what version of swift are you using?
    ro6lyo
    @ro6lyo
    2.2
    Shad Sharma
    @shadanan
    okay. i will try with Cocoapods
    ro6lyo
    @ro6lyo
    I did started with older version of swift , but it still working after update to 2.2
    Shad Sharma
    @shadanan
    we’ll get to the bottom of this, i’m sure. =)
    and if i can get the cocoapods version works, then i ought to be able to fix the carthage version
    ro6lyo
    @ro6lyo
    It will work
    Shad Sharma
    @shadanan
    your confidence is inspiring. :D
    it worked! coolness.
    looks like the versions are different
    here’s cocoapods:
    Installing BrightFutures (3.3.0)
    Installing Result (1.0.2)
    Installing Spine (0.3)
    Installing SwiftyJSON (2.3.2)
    and here’s carthage:
    *** Checking out BrightFutures at "v1.0.1"
    *** Checking out Spine at "swift-1"
    *** Checking out SwiftyJSON at “2.3.3”
    okay, i think i found the problem – carthage uses the latest tag in the repo, which is swift-1
    swift-1’s cartfile is not up-to-date:
    https://github.com/wvteijlingen/Spine/blob/swift-1/Cartfile
    @wvteijlingen we should add a tag to the latest Spine at 0.3
    Shad Sharma
    @shadanan
    @ro6lyo thanks for your help
    ro6lyo
    @ro6lyo
    No worries
    Good luck
    Ward van Teijlingen
    @wvteijlingen
    Hi @shadanan. If I read this correctly Carthage defaults to using the outdated swift-1 tag. Creating an 'official' release is still on my todo list, haven't gotten around to it yet. In the meantime you can pin Spine to a specific commit or the master branch.
    OliverM
    @OliverMahn
    Hi @wvteijlingen, what do you think about updating the cocoa pods pod spec and pushing it to cocoa pods? I am willing to help you but I think the pushing can't be done via pull request?!
    Ward van Teijlingen
    @wvteijlingen
    Hi @OliverMahn, as soon as I have the Swift 3 branch merged into master, I will create a new version and push it to the pod spec.
    Ward van Teijlingen
    @wvteijlingen
    AFAIK there is just one bug left with serializing booleans
    OliverM
    @OliverMahn
    @wvteijlingen Sounds great, if you need support please tell me.
    OliverMahn-flinc
    @OliverMahn-flinc
    @wvteijlingen Hi, It would be great if the dirty-checking branch could be merged into master. I know there could be some conflicts to resolve, is there anything I can do?
    Tobias Scholze
    @tscholze
    Hi folks :) @wvteijlingen just a simple question. I have some ToOne(MyObject.self) relationships in my Resource. But only the id of the related object will be set, all other properties in my Swift class will be nil. Did I miss a step?
    Tobias Scholze
    @tscholze
    I think I have to call the spine.load(myRelatedObject) for each of my root objects. But this seems like a asynchrony hell. :)
    Ward van Teijlingen
    @wvteijlingen
    @tscholze This is probably because the API response didn't include the related resources. Did you use a query with includes configured? query.include("nameOfRelationship")
    Tobias Scholze
    @tscholze
    @wvteijlingen you are absolutely right! sorry for the inconvenient. I'm looking forward to user your great pod :) Thanks.
    Lucas Hosseini
    @beauby
    Hi there – total noob question: where do you instantiate some global instance of Spine (that you later use to register models with (spine.registerResource(Post)))?
    Alejandro Rodriguez Peña
    @arodriguezp2003
    hi, how to use Collections?