Align APIs

This commit is contained in:
Yousef Hamza 2017-05-16 17:56:13 +02:00
parent e157086518
commit 57f716367b
2 changed files with 4 additions and 89 deletions

View File

@ -7,7 +7,7 @@
"test": "jest" "test": "jest"
}, },
"dependencies": { "dependencies": {
"instabug-reactnative": "git+https://github.com/Instabug/instabug-reactnative.git#master", "instabug-reactnative": "file:../",
"react": "15.4.2", "react": "15.4.2",
"react-native": "^0.41.2", "react-native": "^0.41.2",
"react-native-dialogs": "0.0.19" "react-native-dialogs": "0.0.19"

View File

@ -413,23 +413,6 @@ module.exports = {
} }
}, },
/**
* Enables/disables prompt options when SDK is invoked.
* When only a single option is enabled, it become the default invocation mode.
* If all options are disabled, bug reporting becomes the default invocation mode.
* By default, all three options are enabled.
* @param {boolean} isBugReportingEnabled A boolean to indicate whether bug reports
* are enabled or disabled.
* @param {boolean} isFeedbackReportingEnabled A boolean to indicate whether feedback is
* enabled or disabled.
* @param {boolean} isChatEnabled A boolean to indicate whether chat is enabled
* or disabled.
*/
setPromptOptions: function (isBugReportingEnabled, isFeedbackReportingEnabled, isChatEnabled) {
if (Platform.OS === 'ios')
Instabug.setPromptOptions(isBugReportingEnabled, isFeedbackReportingEnabled, isChatEnabled);
},
/** /**
* Checks if a notification is from Instabug. * Checks if a notification is from Instabug.
* If you are using push notifications, use this method to check whether an * If you are using push notifications, use this method to check whether an
@ -445,17 +428,6 @@ module.exports = {
Instabug.isInstabugNotification(dict, isInstabugNotificationCallback); Instabug.isInstabugNotification(dict, isInstabugNotificationCallback);
}, },
/**
* Shows/Hides email field.
* Defaults to show email field.
* @param {boolean} shouldShowEmailField true to show the email field, false to hide it.
*/
setShowEmailField: function (shouldShowEmailField) {
if (Platform.OS == 'ios') {
Instabug.setShowEmailField();
}
},
/** /**
* Sets the default value of the user's email and hides the email field from the reporting UI * Sets the default value of the user's email and hides the email field from the reporting UI
* and set the user's name to be included with all reports. * and set the user's name to be included with all reports.
@ -479,17 +451,6 @@ module.exports = {
} }
}, },
/**
* Sets whether to show a "Thank You" dialog after a bug report is sent or not.
* Defaults to YES.
* @param {boolean} isPostSendingDialogEnabled A boolean to indicate whether the dialog is enabled or not.
*/
setPostSendingDialogEnabled: function (isPostSendingDialogEnabled) {
if (Platform.OS == 'ios') {
Instabug.setPostSendingDialogEnabled(isPostSendingDialogEnabled);
}
},
/** /**
* Sets an array of report categories to be shown for users to select from before reporting a bug or sending * Sets an array of report categories to be shown for users to select from before reporting a bug or sending
* feedback. * feedback.
@ -505,16 +466,6 @@ module.exports = {
} }
}, },
/**
* Enables/disables inspect view hierarchy when reporting a bug/feedback.
* @param {boolean} viewHierarchyEnabled A boolean to set whether view hierarchy are enabled or disabled.
*/
setViewHierarchyEnabled: function (viewHierarchyEnabled) {
if (Platform.OS == 'ios') {
Instabug.setViewHierarchyEnabled(viewHierarchyEnabled);
}
},
/** /**
* Logs a user event that happens through the lifecycle of the application. * Logs a user event that happens through the lifecycle of the application.
* Logged user events are going to be sent with each report, as well as at the end of a session. * Logged user events are going to be sent with each report, as well as at the end of a session.
@ -648,36 +599,6 @@ module.exports = {
} }
}, },
/**
* Appends a log message to Instabug internal log
* <p>
* These logs are then sent along the next uploaded report.
* All log messages are timestamped <br/>
* Logs aren't cleared per single application run.
* If you wish to reset the logs,
* use {@link #clearLogs()} ()}
* </p>
* Note: logs passed to this method are <b>NOT</b> printed to Logcat
*
* @param message the message
*/
logWTF(message){
if (!message)return;
if (Platform.OS === 'android') {
Instabug.log("wtf", message);
}
},
/**
* Clears Instabug internal log
*
*/
clearLogs: function () {
if (Platform.OS === 'android') {
Instabug.clearLogs();
}
},
/** /**
* Sets user attribute to overwrite it's value or create a new one if it doesn't exist. * Sets user attribute to overwrite it's value or create a new one if it doesn't exist.
* *
@ -687,9 +608,7 @@ module.exports = {
setUserAttribute: function (key, value) { setUserAttribute: function (key, value) {
if (!key || !value || typeof key !== "string" || typeof value !== "string") if (!key || !value || typeof key !== "string" || typeof value !== "string")
throw new TypeError("Invalid param, Expected String"); throw new TypeError("Invalid param, Expected String");
if (Platform.OS === 'android') { Instabug.setUserAttribute(key, value);
Instabug.setUserAttribute(key, value);
}
}, },
/** /**
@ -713,9 +632,7 @@ module.exports = {
removeUserAttribute: function (key) { removeUserAttribute: function (key) {
if (!key || typeof key !== "string") if (!key || typeof key !== "string")
throw new TypeError("Invalid param, Expected String"); throw new TypeError("Invalid param, Expected String");
if (Platform.OS === 'android') { Instabug.removeUserAttribute(key);
Instabug.removeUserAttribute(key);
}
}, },
/** /**
@ -733,9 +650,7 @@ module.exports = {
* Clears all user attributes if exists. * Clears all user attributes if exists.
*/ */
clearAllUserAttributes: function () { clearAllUserAttributes: function () {
if (Platform.OS === 'android') { Instabug.clearAllUserAttributes();
Instabug.clearAllUserAttributes();
}
}, },
/** /**