{"action":"created","comment":{"url":"https://api.github.com/repos/realm/realm-cocoa/pulls/comments/26697642","id":26697642,"diff_hunk":"@@ -0,0 +1,562 @@\n+////////////////////////////////////////////////////////////////////////////\n+//\n+// Copyright 2014 Realm Inc.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+// http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+//\n+////////////////////////////////////////////////////////////////////////////\n+\n+import Realm\n+import Realm.Private\n+\n+/**\n+A Realm instance (also referred to as \"a realm\") represents a Realm\n+database.\n+\n+Realms can either be stored on disk (see `init(path:)`) or in\n+memory (see `init(inMemoryIdentifier:)`).\n+\n+Realm instances are cached internally, and constructing equivalent Realm\n+objects (with the same path or identifier) produces limited overhead.\n+\n+If you specifically want to ensure a Realm object is\n+destroyed (for example, if you wish to open a realm, check some property, and\n+then possibly delete the realm file and re-open it), place the code which uses\n+the realm within an `autoreleasepool {}` and ensure you have no other\n+strong references to it.\n+\n+:warning: Realm instances are not thread safe and can not be shared across\n+          threads or dispatch queues. You must construct a new instance on each thread you want\n+          to interact with the realm on. For dispatch queues, this means that you must\n+          call it in each block which is dispatched, as a queue is not guaranteed to run\n+          on a consistent thread.\n+*/\n+public final class Realm {\n+\n+    // MARK: Properties\n+\n+    /// Path to the file where this Realm is persisted.\n+    public var path: String { return rlmRealm.path }\n+\n+    /// Indicates if this Realm was opened in read-only mode.\n+    public var readOnly: Bool { return rlmRealm.readOnly }\n+\n+    /// The Schema used by this realm.\n+    public var schema: Schema { return Schema(rlmRealm.schema) }\n+\n+    /**\n+    The location of the default Realm as a string. Can be overridden.\n+\n+    `~/Application Support/{bundle ID}/default.realm` on OS X.\n+\n+    `default.realm` in your application's documents directory on iOS.\n+\n+    :returns: Location of the default Realm.\n+    */\n+    public class var defaultPath: String {\n+        get {\n+            return RLMRealm.defaultRealmPath()\n+        }\n+        set {\n+            RLMRealm.setDefaultRealmPath(newValue)\n+        }\n+    }\n+\n+    // MARK: Initializers\n+\n+    /**\n+    Obtains a Realm instance persisted at the specified file path. Defaults to\n+    `Realm.defaultPath`\n+\n+    :param: path Path to the realm file.\n+    */\n+    public convenience init(path: String = Realm.defaultPath) {\n+        self.init(RLMRealm(path: path, readOnly: false, error: nil))\n+    }\n+    \n+    /**\n+    Obtains a `Realm` instance with persistence to a specific file path with\n+    options.\n+\n+    Like `init(path:)`, but with the ability to open read-only realms and get\n+    errors as an `NSError` inout parameter rather than exceptions.\n+\n+    :warning: Read-only Realms do not support changes made to the file while the\n+              `Realm` exists. This means that you cannot open a Realm as both read-only\n+              and read-write at the same time. Read-only Realms should normally only be used\n+              on files which cannot be opened in read-write mode, and not just for enforcing\n+              correctness in code that should not need to write to the Realm.\n+\n+    :param: path            Path to the file you want the data saved in.\n+    :param: readOnly        Bool indicating if this Realm is read-only (must use for read-only files).\n+    :param: encryptionKey   64-byte key to use to encrypt the data.\n+    :param: error           If an error occurs, upon return contains an `NSError` object\n+                            that describes the problem. If you are not interested in\n+                            possible errors, omit the argument, or pass in `nil`.\n+    */\n+    public convenience init?(path: String, readOnly: Bool, encryptionKey: NSData? = nil, error: NSErrorPointer = nil) {\n+        if let rlmRealm = RLMRealm(path: path, key: encryptionKey, readOnly: readOnly, inMemory: false, dynamic: false, schema: nil, error: error) as RLMRealm? {\n+            self.init(rlmRealm)\n+        } else {\n+            self.init(RLMRealm())\n+            return nil\n+        }\n+    }\n+\n+    /**\n+    Obtains a Realm instance for an un-persisted in-memory Realm. The identifier\n+    used to create this instance can be used to access the same in-memory Realm from\n+    multiple threads.\n+\n+    Because in-memory Realms are not persisted, you must be sure to hold on to a\n+    reference to the `Realm` object returned from this for as long as you want\n+    the data to last. Realm's internal cache of `Realm`s will not keep the\n+    in-memory Realm alive across cycles of the run loop, so without a strong\n+    reference to the `Realm` a new Realm will be created each time. Note that\n+    `Object`s, `List`s, and `Results` that refer to objects persisted in a Realm have a\n+    strong reference to the relevant `Realm`, as do `NotifcationToken`s.\n+\n+    :param: identifier A string used to identify a particular in-memory Realm.\n+    */\n+    public convenience init(inMemoryIdentifier: String) {\n+        self.init(RLMRealm.inMemoryRealmWithIdentifier(inMemoryIdentifier))\n+    }\n+\n+    // MARK: Transactions\n+\n+    /**\n+    Helper to perform actions contained within the given block inside a write transation.\n+\n+    :param: block The block to be executed inside a write transaction.\n+    */\n+    public func write(block: (() -> Void)) {\n+        rlmRealm.transactionWithBlock(block)\n+    }\n+\n+    /**\n+    Begins a write transaction in a `Realm`.\n+\n+    Only one write transaction can be open at a time. Write transactions cannot be\n+    nested, and trying to begin a write transaction on a `Realm` which is\n+    already in a write transaction with throw an exception. Calls to\n+    `beginWrite` from `Realm` instances in other threads will block\n+    until the current write transaction completes.\n+\n+    Before beginning the write transaction, `beginWrite` updates the\n+    `Realm` to the latest Realm version, as if `refresh()` was called, and\n+    generates notifications if applicable. This has no effect if the `Realm`\n+    was already up to date.\n+\n+    It is rarely a good idea to have write transactions span multiple cycles of\n+    the run loop, but if you do wish to do so you will need to ensure that the\n+    `Realm` in the write transaction is kept alive until the write transaction\n+    is committed.\n+    */\n+    public func beginWrite() {\n+        rlmRealm.beginWriteTransaction()\n+    }\n+\n+    /**\n+    Commits all writes operations in the current write transaction.\n+\n+    After this is called, the `Realm` reverts back to being read-only.\n+\n+    Calling this when not in a write transaction will throw an exception.\n+    */\n+    public func commitWrite() {\n+        rlmRealm.commitWriteTransaction()\n+    }\n+\n+    /**\n+    Revert all writes made in the current write transaction and end the transaction.\n+\n+    This rolls back all objects in the Realm to the state they were in at the\n+    beginning of the write transaction, and then ends the transaction.\n+\n+    This restores the data for deleted objects, but does not reinstate deleted\n+    accessor objects. Any `Object`s which were added to the Realm will be\n+    invalidated rather than switching back to standalone objects.\n+    Given the following code:\n+\n+    ```swift\n+    let oldObject = objects(ObjectType).first!\n+    let newObject = ObjectType()\n+\n+    realm.beginWrite()\n+    realm.add(newObject)\n+    realm.delete(oldObject)\n+    realm.cancelWrite()\n+    ```\n+\n+    Both `oldObject` and `newObject` will return `true` for `invalidated`,\n+    but re-running the query which provided `oldObject` will once again return\n+    the valid object.\n+\n+    Calling this when not in a write transaction will throw an exception.\n+    */\n+    public func cancelWrite() {\n+        rlmRealm.cancelWriteTransaction()\n+    }\n+\n+    // MARK: Adding and Creating objects\n+\n+    /**\n+    Adds or updates an object to be persisted it in this Realm.\n+\n+    When 'update' is 'true', the object must have a primary key. If no objects exist in\n+    the Realm instance with the same primary key value, the object is inserted. Otherwise,\n+    the existing object is updated with any changed values.\n+\n+    When added, all linked (child) objects referenced by this object will also be\n+    added to the Realm if they are not already in it. If the object or any linked\n+    objects already belong to a different Realm an exception will be thrown. Use one\n+    of the `create` functions to insert a copy of a persisted object into a different\n+    Realm.\n+\n+    The object to be added must be valid and cannot have been previously deleted\n+    from a Realm (i.e. `invalidated`) must be false.\n+\n+    :param: object Object to be added to this Realm.\n+    :param: update If true will try to update existing objects with the same primary key.\n+    */\n+    public func add(object: Object, update: Bool = false) {\n+        var options : RLMCreationOptions = .allZeros\n+        if update {\n+            options = .UpdateOrCreate\n+            if object.objectSchema.primaryKeyProperty == nil {\n+                throwRealmException(\"'\\(object.objectSchema.className)' does not have a primary key and can not be updated\")\n+            }\n+        }\n+        RLMAddObjectToRealm(object, rlmRealm, options)\n+    }\n+\n+    /**\n+    Adds or updates objects in the given sequence to be persisted it in this Realm.\n+\n+    :see: add(object:update:)\n+\n+    :param: objects A sequence which contains objects to be added to this Realm.\n+    :param: update If true will try to update existing objects with the same primary key.\n+    */\n+    public func add<S: SequenceType where S.Generator.Element: Object>(objects: S, update: Bool = false) {\n+        for obj in objects {\n+            add(obj, update: update)\n+        }\n+    }\n+\n+    /**\n+    Create an `Object` with the given object.\n+\n+    Creates or updates an instance of this object and adds it to the `Realm` populating\n+    the object represented by value.\n+    \n+    When 'update' is 'true', the object must have a primary key. If no objects exist in\n+    the Realm instance with the same primary key value, the object is inserted. Otherwise, \n+    the existing object is updated with any changed values.\n+\n+    :param: type    The object type to create.\n+    :param: value   The value used to populate the object. This can be any key/value coding compliant\n+                    object, or a JSON dictionary such as those returned from the methods in `NSJSONSerialization`,\n+                    or an `Array` with one object for each persisted property. An exception will be\n+                    thrown if any required properties are not present and no default is set.\n+\n+                    When passing in an `Array`, all properties must be present,\n+                    valid and in the same order as the properties defined in the model.\n+    :param: update  If true will try to update existing objects with the same primary key.\n+\n+    :returns: The created object.\n+    */\n+    public func create<T: Object>(type: T.Type, value: AnyObject = [:], update: Bool = false) -> T {\n+        var options : RLMCreationOptions = .allZeros\n+        if update {\n+            options = .UpdateOrCreate\n+            if schema[T.className()]?.primaryKeyProperty == nil {\n+                throwRealmException(\"'\\(T.className())' does not have a primary key and can not be updated\")\n+            }\n+        }\n+        return unsafeBitCast(RLMCreateObjectInRealmWithValue(rlmRealm, T.className(), value, options), T.self)\n+    }\n+\n+    // MARK: Deleting objects\n+\n+    /**\n+    Deletes the given object from this Realm.\n+\n+    :param: object The object to be deleted.\n+    */\n+    public func delete(object: Object) {\n+        RLMDeleteObjectFromRealm(object, rlmRealm)\n+    }\n+\n+    /**\n+    Deletes the given objects from this Realm.\n+\n+    :param: object The objects to be deleted. This can be a `List<Object>`, `Results<Object>`,\n+                   or any other enumerable SequenceType which generates Object.\n+    */\n+    public func delete<S: SequenceType where S.Generator.Element: Object>(objects: S) {\n+        for obj in objects {\n+            delete(obj)\n+        }\n+    }\n+\n+    public func delete<T: Object>(objects: List<T>) {\n+        rlmRealm.deleteObjects(objects._rlmArray)\n+    }\n+\n+    public func delete<T: Object>(objects: Results<T>) {\n+        rlmRealm.deleteObjects(objects.rlmResults)\n+    }\n+\n+    /**\n+    Deletes all objects from this Realm.\n+    */\n+    public func deleteAll() {\n+        RLMDeleteAllObjectsFromRealm(rlmRealm)\n+    }\n+\n+    // MARK: Object Retrieval\n+\n+    /**\n+    Returns all objects of the given type in the Realm.\n+\n+    :param: type  The type of the objects to be returned.\n+\n+    :returns: All objects of the given type in Realm.\n+    */\n+    public func objects<T: Object>(type: T.Type) -> Results<T> {\n+        return Results<T>(RLMGetObjects(rlmRealm, T.className(), nil))\n+    }\n+\n+    /**\n+    Get an object with the given primary key.\n+\n+    Returns `nil` if no object exists with the given primary key.\n+\n+    This method requires that `primaryKey()` be overridden on the given subclass.\n+\n+    :see: Object.primaryKey()\n+\n+    :param: type    The type of the objects to be returned.\n+    :param: key     The primary key of the desired object.\n+\n+    :returns: An object of type `type` or `nil` if an object with the given primary key does not exist.\n+    */\n+    public func objectForPrimaryKey<T: Object>(type: T.Type, key: AnyObject) -> T? {\n+        return unsafeBitCast(RLMGetObject(rlmRealm, type.className(), key), Optional<T>.self)\n+    }\n+\n+\n+    // MARK: Notifications\n+\n+    /**\n+    Add a notification handler for changes in this Realm.\n+\n+    :param: block A block which is called to process Realm notifications.\n+                  It receives the following parameters:\n+\n+                  - `Notification`: The incoming notification.\n+                  - `Realm`:        The realm for which this notification occurred.\n+\n+    :returns: A notification token which can later be passed to `removeNotification(_:)`\n+              to remove this notification.\n+    */\n+    public func addNotificationBlock(block: NotificationBlock) -> NotificationToken {\n+        return rlmRealm.addNotificationBlock(rlmNotificationBlockFromNotificationBlock(block))\n+    }\n+\n+    /**\n+    Remove a previously registered notification handler using the token returned\n+    from `addNotificationBlock(_:)`\n+\n+    :param: notificationToken The token returned from `addNotificationBlock(_:)`\n+                              corresponding to the notification block to remove.\n+    */\n+    public func removeNotification(notificationToken: NotificationToken) {\n+        rlmRealm.removeNotification(notificationToken)\n+    }\n+\n+\n+    // MARK: Autorefresh and Refresh\n+\n+    /**\n+    Whether this Realm automatically updates when changes happen in other threads.\n+\n+    If set to `true` (the default), changes made on other threads will be reflected\n+    in this Realm on the next cycle of the run loop after the changes are\n+    committed.  If set to `false`, you must manually call -refresh on the Realm to\n+    update it to get the latest version.\n+\n+    Even with this enabled, you can still call `refresh()` at any time to update the\n+    Realm before the automatic refresh would occur.\n+\n+    Notifications are sent when a write transaction is committed whether or not\n+    this is enabled.\n+\n+    Disabling this on a `Realm` without any strong references to it will not\n+    have any effect, and it will switch back to YES the next time the `Realm`\n+    object is created. This is normally irrelevant as it means that there is\n+    nothing to refresh (as persisted `Object`s, `List`s, and `Results` have strong\n+    references to the containing `Realm`), but it means that setting\n+    `Realm().autorefresh = false` in\n+    `application(_:didFinishLaunchingWithOptions:)` and only later storing Realm\n+    objects will not work.\n+\n+    Defaults to true.\n+    */\n+    public var autorefresh: Bool {\n+        get {\n+            return rlmRealm.autorefresh\n+        }\n+        set {\n+            rlmRealm.autorefresh = newValue\n+        }\n+    }\n+\n+    /**\n+    Update a `Realm` and outstanding objects to point to the most recent\n+    data for this `Realm`.\n+\n+    :returns: Whether the realm had any updates.\n+              Note that this may return true even if no data has actually changed.\n+\n+    */\n+    public func refresh() -> Bool {\n+        return rlmRealm.refresh()\n+    }\n+\n+    // MARK: Invalidation\n+\n+    /**\n+    Invalidate all `Object`s and `Results` read from this Realm.\n+\n+    A Realm holds a read lock on the version of the data accessed by it, so\n+    that changes made to the Realm on different threads do not modify or delete the\n+    data seen by this Realm. Calling this method releases the read lock,\n+    allowing the space used on disk to be reused by later write transactions rather\n+    than growing the file. This method should be called before performing long\n+    blocking operations on a background thread on which you previously read data\n+    from the Realm which you no longer need.\n+\n+    All `Object`, `Results` and `List` instances obtained from this\n+    `Realm` on the current thread are invalidated, and can not longer be used.\n+    The `Realm` itself remains valid, and a new read transaction is implicitly\n+    begun the next time data is read from the Realm.\n+\n+    Calling this method multiple times in a row without reading any data from the\n+    Realm, or before ever reading any data from the Realm is a no-op. This method\n+    cannot be called on a read-only Realm.\n+    */\n+    public func invalidate() {\n+        rlmRealm.invalidate()\n+    }\n+\n+    // MARK: Writing a Copy\n+\n+    /**\n+    Write an encrypted and compacted copy of the Realm to the given path.\n+\n+    The destination file cannot already exist.\n+\n+    Note that if this is called from within a write transaction it writes the\n+    *current* data, and not data when the last write transaction was committed.\n+\n+    :param: path          Path to save the Realm to.\n+    :param: encryptionKey Optional 64-byte encryption key to encrypt the new file with.\n+    :returns:             If an error occurs, returns an `NSError` object, otherwise `nil`.\n+\n+    :returns: Whether the realm was copied successfully.\n+    */\n+    public func writeCopyToPath(path: String, encryptionKey: NSData? = nil) -> NSError? {\n+        var error: NSError?\n+        if let encryptionKey = encryptionKey {\n+            rlmRealm.writeCopyToPath(path, encryptionKey: encryptionKey, error: &error)\n+        }\n+        else {","path":"RealmSwift/Realm.swift","position":485,"original_position":485,"commit_id":"b93a9fa1e58eb9b68bdac79cc57d03f380a1910f","original_commit_id":"b93a9fa1e58eb9b68bdac79cc57d03f380a1910f","user":{"login":"jpsim","id":474794,"avatar_url":"https://avatars.githubusercontent.com/u/474794?v=3","gravatar_id":"","url":"https://api.github.com/users/jpsim","html_url":"https://github.com/jpsim","followers_url":"https://api.github.com/users/jpsim/followers","following_url":"https://api.github.com/users/jpsim/following{/other_user}","gists_url":"https://api.github.com/users/jpsim/gists{/gist_id}","starred_url":"https://api.github.com/users/jpsim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpsim/subscriptions","organizations_url":"https://api.github.com/users/jpsim/orgs","repos_url":"https://api.github.com/users/jpsim/repos","events_url":"https://api.github.com/users/jpsim/events{/privacy}","received_events_url":"https://api.github.com/users/jpsim/received_events","type":"User","site_admin":false},"body":"else is on same line as previous closing brace in the rest of our Swift code","created_at":"2015-03-18T19:20:55Z","updated_at":"2015-03-18T19:20:55Z","html_url":"https://github.com/realm/realm-cocoa/pull/1639#discussion_r26697642","pull_request_url":"https://api.github.com/repos/realm/realm-cocoa/pulls/1639","_links":{"self":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/comments/26697642"},"html":{"href":"https://github.com/realm/realm-cocoa/pull/1639#discussion_r26697642"},"pull_request":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/1639"}}},"pull_request":{"url":"https://api.github.com/repos/realm/realm-cocoa/pulls/1639","id":31262879,"html_url":"https://github.com/realm/realm-cocoa/pull/1639","diff_url":"https://github.com/realm/realm-cocoa/pull/1639.diff","patch_url":"https://github.com/realm/realm-cocoa/pull/1639.patch","issue_url":"https://api.github.com/repos/realm/realm-cocoa/issues/1639","number":1639,"state":"open","locked":false,"title":"New Swift apis","user":{"login":"alazier","id":250144,"avatar_url":"https://avatars.githubusercontent.com/u/250144?v=3","gravatar_id":"","url":"https://api.github.com/users/alazier","html_url":"https://github.com/alazier","followers_url":"https://api.github.com/users/alazier/followers","following_url":"https://api.github.com/users/alazier/following{/other_user}","gists_url":"https://api.github.com/users/alazier/gists{/gist_id}","starred_url":"https://api.github.com/users/alazier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alazier/subscriptions","organizations_url":"https://api.github.com/users/alazier/orgs","repos_url":"https://api.github.com/users/alazier/repos","events_url":"https://api.github.com/users/alazier/events{/privacy}","received_events_url":"https://api.github.com/users/alazier/received_events","type":"User","site_admin":false},"body":"This is finally ready for review.\r\n\r\n@tgoyne @segiddins @jpsim ","created_at":"2015-03-16T17:02:34Z","updated_at":"2015-03-18T19:20:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"18bce94db636dd7ae48af7386f842776eae967db","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/realm/realm-cocoa/pulls/1639/commits","review_comments_url":"https://api.github.com/repos/realm/realm-cocoa/pulls/1639/comments","review_comment_url":"https://api.github.com/repos/realm/realm-cocoa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/issues/1639/comments","statuses_url":"https://api.github.com/repos/realm/realm-cocoa/statuses/b93a9fa1e58eb9b68bdac79cc57d03f380a1910f","head":{"label":"realm:al-swift","ref":"al-swift","sha":"b93a9fa1e58eb9b68bdac79cc57d03f380a1910f","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":4044891,"name":"realm-cocoa","full_name":"realm/realm-cocoa","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-cocoa","description":"Realm is a mobile database: a replacement for Core Data & SQLite","fork":false,"url":"https://api.github.com/repos/realm/realm-cocoa","forks_url":"https://api.github.com/repos/realm/realm-cocoa/forks","keys_url":"https://api.github.com/repos/realm/realm-cocoa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-cocoa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-cocoa/teams","hooks_url":"https://api.github.com/repos/realm/realm-cocoa/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-cocoa/events","assignees_url":"https://api.github.com/repos/realm/realm-cocoa/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-cocoa/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-cocoa/tags","blobs_url":"https://api.github.com/repos/realm/realm-cocoa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-cocoa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-cocoa/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-cocoa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-cocoa/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-cocoa/languages","stargazers_url":"https://api.github.com/repos/realm/realm-cocoa/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-cocoa/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-cocoa/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-cocoa/subscription","commits_url":"https://api.github.com/repos/realm/realm-cocoa/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-cocoa/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-cocoa/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-cocoa/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-cocoa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-cocoa/merges","archive_url":"https://api.github.com/repos/realm/realm-cocoa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-cocoa/downloads","issues_url":"https://api.github.com/repos/realm/realm-cocoa/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-cocoa/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-cocoa/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-cocoa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-cocoa/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-cocoa/releases{/id}","created_at":"2012-04-16T20:06:56Z","updated_at":"2015-03-18T14:38:56Z","pushed_at":"2015-03-18T17:49:07Z","git_url":"git://github.com/realm/realm-cocoa.git","ssh_url":"git@github.com:realm/realm-cocoa.git","clone_url":"https://github.com/realm/realm-cocoa.git","svn_url":"https://github.com/realm/realm-cocoa","homepage":"http://realm.io","size":112121,"stargazers_count":3202,"watchers_count":3202,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":239,"mirror_url":null,"open_issues_count":124,"forks":239,"open_issues":124,"watchers":3202,"default_branch":"master"}},"base":{"label":"realm:master","ref":"master","sha":"4525543179ce07b8219a79987493d916f9362c41","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":4044891,"name":"realm-cocoa","full_name":"realm/realm-cocoa","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-cocoa","description":"Realm is a mobile database: a replacement for Core Data & SQLite","fork":false,"url":"https://api.github.com/repos/realm/realm-cocoa","forks_url":"https://api.github.com/repos/realm/realm-cocoa/forks","keys_url":"https://api.github.com/repos/realm/realm-cocoa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-cocoa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-cocoa/teams","hooks_url":"https://api.github.com/repos/realm/realm-cocoa/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-cocoa/events","assignees_url":"https://api.github.com/repos/realm/realm-cocoa/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-cocoa/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-cocoa/tags","blobs_url":"https://api.github.com/repos/realm/realm-cocoa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-cocoa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-cocoa/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-cocoa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-cocoa/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-cocoa/languages","stargazers_url":"https://api.github.com/repos/realm/realm-cocoa/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-cocoa/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-cocoa/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-cocoa/subscription","commits_url":"https://api.github.com/repos/realm/realm-cocoa/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-cocoa/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-cocoa/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-cocoa/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-cocoa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-cocoa/merges","archive_url":"https://api.github.com/repos/realm/realm-cocoa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-cocoa/downloads","issues_url":"https://api.github.com/repos/realm/realm-cocoa/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-cocoa/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-cocoa/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-cocoa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-cocoa/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-cocoa/releases{/id}","created_at":"2012-04-16T20:06:56Z","updated_at":"2015-03-18T14:38:56Z","pushed_at":"2015-03-18T17:49:07Z","git_url":"git://github.com/realm/realm-cocoa.git","ssh_url":"git@github.com:realm/realm-cocoa.git","clone_url":"https://github.com/realm/realm-cocoa.git","svn_url":"https://github.com/realm/realm-cocoa","homepage":"http://realm.io","size":112121,"stargazers_count":3202,"watchers_count":3202,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":239,"mirror_url":null,"open_issues_count":124,"forks":239,"open_issues":124,"watchers":3202,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/1639"},"html":{"href":"https://github.com/realm/realm-cocoa/pull/1639"},"issue":{"href":"https://api.github.com/repos/realm/realm-cocoa/issues/1639"},"comments":{"href":"https://api.github.com/repos/realm/realm-cocoa/issues/1639/comments"},"review_comments":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/1639/comments"},"review_comment":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/1639/commits"},"statuses":{"href":"https://api.github.com/repos/realm/realm-cocoa/statuses/b93a9fa1e58eb9b68bdac79cc57d03f380a1910f"}}}}